On 09/04/2010 08:28 AM, Amos Jeffries wrote:
> If your comment is correct and connKeepReadingIncompleteRequest() only
> refer to the headers. Could the function name be updated too say that?
>
> In connCancelIncompleteRequests the debugs look useless for level 1.
> There is no info about which requests they refer. If you wish to retain
> them at that level please use DBG_IMPORTANT, reference something to
> track the request and add a WARNING or NOTICE etc tag to highlight why
> they are at that level.
I will morph the functions below into a single
ConnStateData::checkForHugeHeaders() method and raise the debug level
unless there are objections.
Thank you,
Alex.
> // here, an "incomplete request" means we have not found the end of headers yet
> int
> connKeepReadingIncompleteRequest(ConnStateData * conn)
> {
> return conn->in.notYetUsed >= Config.maxRequestHeaderSize ? 0 : 1;
> }
>
> void
> connCancelIncompleteRequests(ConnStateData * conn)
> {
> ClientSocketContext *context = parseHttpRequestAbort(conn, "error:request-!
> clientStreamNode *node = context->getClientReplyContext();
> assert(!connKeepReadingIncompleteRequest(conn));
> debugs(33, 1, "Request header is too large (" << conn->in.notYetUsed << " !
> debugs(33, 1, "Config 'request_header_max_size'= " << Config.maxRequestHea!
> clientReplyContext *repContext = dynamic_cast<clientReplyContext *>(node->!
> assert (repContext);
> repContext->setReplyToError(ERR_TOO_BIG,
> HTTP_BAD_REQUEST, METHOD_NONE, NULL,
> conn->peer, NULL, NULL, NULL);
> context->registerWithConn();
> context->pullData();
> }
Received on Sun Sep 05 2010 - 19:11:35 MDT
This archive was generated by hypermail 2.2.0 : Mon Sep 06 2010 - 12:00:04 MDT