Encountered a bug today but not sure it's a Catalyst bug or not. Using a reasonably up-to-date Catalyst (5.80031) -- I have two Catalyst projects: one large-scale backoffice app with a REST webservice (via Catalyst::Controller::REST), and another public-facing app that talks to that webservice (via Catalyst::Model::REST).
Under the development servers, this interaction worked fine. When deployed under FastCGI, the public app started complaining about a malformed status line in the response from the backoffice. As best I can tell the error is from a lack of a reason phrase on the HTTP status line. Catalyst::Engine::HTTP adds the reason phrase (as given by HTTP::Status) but Catalyst::Engine::CGI (and by extension ::FastCGI) does not. Development server response: HTTP/1.0 200 OK\r\n > FastCGI server response from the same app: HTTP/1.1 200\r\n My reading of the HTTP spec suggests that while the reason phrase is allowed to be a zero-length string, the preceding space is still required: Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF > Status-Code = 3DIGIT > Reason-Phrase = *<TEXT, excluding CR, LF> > I'll concede the possibility that this is not a Catalyst bug at all, and Apache (or whatever the FCGI host server is) is supposed to be adding the reason phrase itself (and is failing to do so in my environment for some reason), hence why I haven't submitted this as an actual bug against Catalyst yet. Or maybe I'm reading the spec wrong and HTTP::Tiny is also too strict. In any case, I hacked C::E::CGI locally to add the reason phrase (basically copy-paste from ::HTTP) and the issue was resolved. Have not had a chance to test against Catalyst 5.89 trial to see if the switch to Plack has magically made this issue go away. Some guidance would be appreciated. -- Stephen Clouse <[email protected]>
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
