Skip to content

Commit

Permalink
allow requests with charset to be translated to application/json
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed May 3, 2013
1 parent 62a9f96 commit 5813e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Server/Role/Request.pm
Expand Up @@ -6,7 +6,7 @@ around [qw(content_type header)] => sub {
my ($orig, $self) = (shift,shift);
my $header = $self->$orig(@_);
return unless($header);
return $header eq 'application/x-www-form-urlencoded' ? 'application/json' : $header;
return $header =~ /^application\/x-www-form-urlencoded/ ? 'application/json' : $header;
};

1;

0 comments on commit 5813e52

Please sign in to comment.