/[Frey]/trunk/lib/Frey/CouchAPI.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/CouchAPI.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1054 by dpavlin, Thu Apr 23 21:06:48 2009 UTC revision 1056 by dpavlin, Thu Apr 23 21:24:25 2009 UTC
# Line 273  L<http://wiki.apache.org/couchdb/HTTP_Do Line 273  L<http://wiki.apache.org/couchdb/HTTP_Do
273                          } else {                          } else {
274                                  warn "retrive $p ", -s $p, " bytes\n";                                  warn "retrive $p ", -s $p, " bytes\n";
275                                  $json = Storable::retrieve( $p );                                  $json = Storable::retrieve( $p );
276                                    if ( delete $arg->{revs_info} ) {
277                                            my $rev = file_rev $p;
278                                            $json->{_rev} = $rev;
279                                            $json->{_revs_info} = [
280                                                    { rev => $rev, status => 'available' }
281                                            ];
282                                    }
283                                    $status = 200;
284    
285                          }                          }
286                  } elsif ( $method eq 'DELETE' ) {                  } elsif ( $method eq 'DELETE' ) {
287                          if ( -e $p ) {                          if ( -e $p ) {
# Line 280  L<http://wiki.apache.org/couchdb/HTTP_Do Line 289  L<http://wiki.apache.org/couchdb/HTTP_Do
289                          } else {                          } else {
290                                  $status = 404;                                  $status = 404;
291                          }                          }
292                    } elsif ( $method eq 'POST' ) {
293                            $json = { total_rows => 0, offset => 0 };
294                            $status = 202; # FIXME implement real view server and return 200
295                  } else {                  } else {
296                          $status = 501;                          $status = 501;
297                  }                  }

Legend:
Removed from v.1054  
changed lines
  Added in v.1056

  ViewVC Help
Powered by ViewVC 1.1.26