On Fri, Oct 9, 2009 at 3:30 PM, Jeff Trawick <[email protected]> wrote: > On Fri, Oct 9, 2009 at 1:26 PM, Barry Scott <[email protected]> wrote: >> Jeff Trawick wrote: >>> >>> On Fri, Oct 9, 2009 at 12:04 PM, Barry Scott <[email protected]> >>> wrote: >>> >>>> >>>> This has been filed as issue >>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=47973 >>>> >>> See patch attached to the PR. Thanks! >>> >>> >> >> No joy I get internal server error. >> >> But the patch below works for my case. > ... > >> Index: modules/fcgid/fcgid_bridge.c >> =================================================================== >> --- modules/fcgid/fcgid_bridge.c (revision 823573) >> +++ modules/fcgid/fcgid_bridge.c (working copy) >> @@ -470,6 +470,8 @@ >> return HTTP_INTERNAL_SERVER_ERROR; >> } >> >> + if (role == FCGI_RESPONDER) { >> + >> /* Stdin header and body */ >> /* XXX HACK: I have to read all the request into memory before sending it >> to fastcgi application server, this prevents slow clients from >> @@ -624,6 +626,7 @@ >> apr_brigade_destroy(input_brigade); >> } >> while (!seen_eos); >> + } /* end handling request body for responders */ >> >> /* Append an empty body stdin header */ >> stdin_request_header = apr_bucket_alloc(sizeof(FCGI_Header), >> >> > > Variation number three: > > As with your patch, it remembers to add the eos bucket to the brigade > of data sent to the app. As with my earlier patch, it doesn't send > the trailing FCGI_STDIN record. > > In the spec (http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S6.3), > there's no mention of FCGI_STDIN for an FCGI_AUTHORIZER. I > double-checked that mod_fcgid.c strips any CONTENT_LENGTH when calling > the authorizer, which the spec does call for. > > I won't be shocked if it still fails for you; in that case I think we > need to try to understand exactly why the trailing FCGI_STDIN record > is needed. > > (FWIW, my authorizer is Perl using the FCGI module. The protocol > implementation on the app side could explain the difference in our > observations.)
Silly me. Chris's patch at http://people.apache.org/~chrisd/patches/mod_fcgid_auth/mod_fcgid-1auth-trunk.patch handles this, and it does send a trailing FCGI_STDIN record to an authorizer. Chris, AYT?
