Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Plack CPAN distribution.

Report information
The Basics
Id: 61391
Status: rejected
Priority: 0/
Queue: Plack

Owner: Nobody in particular
Requestors: TIMB [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Subject: HTTP::Message::PSGI req_to_psgi doesn't set CONTENT_LENGTH
Download (untitled) / with headers
text/plain 721b
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.
Download (untitled) / with headers
text/plain 108b
This definitely sounds like a bug in HTTP::Message::PSGI - care to write a failing test or patch? thanks :)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to