/[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 1052 by dpavlin, Thu Apr 23 20:12:45 2009 UTC revision 1053 by dpavlin, Thu Apr 23 20:24:48 2009 UTC
# Line 23  use URI::Escape; Line 23  use URI::Escape;
23  use File::Path qw(make_path remove_tree);  use File::Path qw(make_path remove_tree);
24  use Storable;  use Storable;
25    
26  our $VERSION = '0.1';  our $VERSION = '0.2';
27  $VERSION .= ' on Frey ' . $Frey::VERSION;  $VERSION .= " (Frey $Frey::VERSION)" if $Frey::VERSION;
28    
29  our $debug = $Frey::debug || 0;  our $debug = $Frey::debug || 0;
30    
# Line 275  L<http://wiki.apache.org/couchdb/HTTP_Do Line 275  L<http://wiki.apache.org/couchdb/HTTP_Do
275          }          }
276    
277          $tx->res->code( $status );          $tx->res->code( $status );
278          $tx->res->headers->content_type( 'text/json' );          $tx->res->headers->content_type( 'text/plain;charset=utf-8' );
279          my $body = to_json $json;          my $body = to_json $json;
280          $tx->res->body( $body );          $tx->res->body( $body );
281          warn "CouchDB API: $method $url $status $body\n";          $tx->res->headers->add_line( 'Cache-Control' => 'must-revalidate' );
282            $tx->res->headers->add_line( 'Server' => "Frey::CouchAPI/$VERSION" );
283    
284            warn "INFO CouchDB API $method $url $status\n$body\n";
285    
286          warn "## headers ", $tx->res->headers->to_string;          warn "## headers ", $tx->res->headers->to_string;
287    

Legend:
Removed from v.1052  
changed lines
  Added in v.1053

  ViewVC Help
Powered by ViewVC 1.1.26