|Subject:||HTTP::Message::PSGI req_to_psgi doesn't set CONTENT_LENGTH|
The $req->content method requires CONTENT_LENGTH to be set. (That might be a bug in itself since rfc2616 doesn't require the header to be present. If not present then I think it should read all available content. Also, I see the seek() isn't checked for an error. If the $fh isn't seekable won't the content be missing in future calls?) The HTTP::Message::PSGI req_to_psgi doesn't set CONTENT_LENGTH, so the content in a request like HTTP::Request->new(POST => "...", , $content); is lost when passed through req_to_psgi(). I came across this problem writing tests using HTTP::Request->new(POST => "...", , $content); The workaround is to add an explicit Content-Length header, but that should not be required.