Skip to content

Commit

Permalink
fixes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
norbu09 committed Jun 16, 2011
1 parent 3ec59fb commit ce2fdd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Net/Dropbox/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use Mouse;
use Net::OAuth;
use LWP::UserAgent;
use URI;
use HTTP::Status qw(:constants);
use HTTP::Request::Common;
use Data::Random qw(rand_chars);
use Encode;
Expand Down Expand Up @@ -210,9 +209,10 @@ sub list {
error_handler => sub {
my $obj = shift;
my $resp = shift;
if( $resp->code == HTTP_NOT_MODIFIED ) {
return to_json({ http_response_code =>
HTTP_NOT_MODIFIED });
# HTTP::Status is nice but old RHEL5 has issues with it
# so we use plain codes
if( $resp->code == 304 ) {
return to_json({ http_response_code => 304 });
} else {
return $self->_talk_default_error_handler($resp);
}
Expand Down

0 comments on commit ce2fdd0

Please sign in to comment.