Skip to content

Commit 5813e52

Browse files
committed
allow requests with charset to be translated to application/json
1 parent 62a9f96 commit 5813e52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/MetaCPAN/Server/Role/Request.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ around [qw(content_type header)] => sub {
66
my ($orig, $self) = (shift,shift);
77
my $header = $self->$orig(@_);
88
return unless($header);
9-
return $header eq 'application/x-www-form-urlencoded' ? 'application/json' : $header;
9+
return $header =~ /^application\/x-www-form-urlencoded/ ? 'application/json' : $header;
1010
};
1111

1212
1;

0 commit comments

Comments
 (0)