[interchange-bugs] [rt.icdevgroup.org #324] Configuration directive for supported content types
Stefan Hornburg via RT
interchange at rt.icdevgroup.org
Fri Oct 23 13:15:47 UTC 2009
Fri Oct 23 13:15:46 2009: Request 324 was acted upon.
Transaction: Ticket created by racke
Queue: Interchange
Subject: Configuration directive for supported content types
Owner: Nobody
Requestors: racke at linuxia.de
Status: new
Ticket <URL: http://rt.icdevgroup.org/Ticket/Display.html?id=324 >
Hello,
currently this is hardcoded in Server.pm, line 254:
if ($CGI::content_type =~ m{^(?:multipart/form-data|application/x-www-form-urlencoded|application/xml|application/json)\b}i) {
parse_post(\$CGI::query_string)
if $Global::TolerateGet;
parse_post($h->{entity});
}
else {
## invalid content type for POST
## XXX we may want to be a little more forgiving here
my $msg = ::get_locale_message(415, "Unsupported Content-Type for POST method");
my $content_type = $msg =~ /<html/i ? 'text/html' : 'text/plain';
my $len = length($msg);
$Vend::StatusLine = <<EOF;
Status: 415 Unsupported Media Type
Content-Type: $content_type
Content-Length: $len
EOF
respond('', \$msg);
die($msg);
}
}
Carl Bailey suggested on the mailing list to create a configuration directive for supported content types:
http://www.icdevgroup.org/pipermail/interchange-users/2009-October/051266.html
Regards
Racke
More information about the interchange-bugs
mailing list