It seems like even after I set the flag ANA_REQ_HTTP_BODY, the fetch function still does not work with the entire message in the buffer. What it seems like it is getting is just the CRLF in the 100-Continue message. Also in our fetch function, it seems like the buffer from previous requests is preserved and merely written over, so sometimes we will have leftover data from a previous buffer.
On Tue, Mar 1, 2011 at 2:29 PM, Willy Tarreau <[email protected]> wrote: > On Tue, Mar 01, 2011 at 01:14:21PM -0800, Nathaniel Irvin wrote: > > Thanks for the quick response! > > > > Just a quick correction and question. > > > > When I mentioned requests above 1000k, i actually meant 1000 bytes. > > Basically it seemed like it didn't work whenever the request was big > enough > > to force a 100-Continue. I'm not sure if this would change anything, > since > > we still want to be capable of handling large requests, but I wanted to > make > > sure that I provided as much information as possible. > > > > You mentioned enabling the request POST body analyzer. What is the best > way > > to use this? > > Right now, you should modify http_process_request so that it adds the > flag ANA_REQ_HTTP_BODY (or something like this) to the list of > req->analysers > if the method is a POST. In the same code, there are other places where > this > is done, eg when there's a non-null url_param_len. This analyser already > exists, and if enabled, will wait for the data to come into the buffer. > > We need to check whether your ACLs will be processed after that point, > but I think it is the case. They're called in http_request_process_common > > I think. I'm sorry I don't have the code in front of the eyes right now, > hence my approximative response. But the principle really is : > > 1) detect if you need to wait for a body. Let's consider that any POST > does for now. > > 2) wait for that body > > 3) freely apply any analysis on that body once you have it. > > Regards, > Willy > > -- Nathaniel Irvin Junior Developer True North Service, Inc.

