httpProcessReplyHeader question

From: Adrian Chadd <adrian@dont-contact.us>
Date: Tue, 13 Feb 2007 19:45:51 +0800

There's this in httpProcessReplyHeader:

    hdr_size = headersEnd(httpState->reply_hdr.buf, hdr_len);
    if (hdr_size)
        hdr_len = hdr_size;
    if (hdr_len > Config.maxReplyHeaderSize) {
        debug(11, 1) ("httpProcessReplyHeader: Too large reply header\n");
        /* [ahc] XXX not sure how to handle this and we should think about it; so fail out for now */
        storeAppend(entry, httpState->reply_hdr.buf, httpState->reply_hdr.size);
        memBufClean(&httpState->reply_hdr);
        reply->sline.status = HTTP_HEADER_TOO_LARGE;
        httpState->reply_hdr_state += 2;
        ctx_exit(ctx);
        return size;
    }

Why is there a storeAppend with no http parse? I'm about to pop out appending header
data into the store from the http code and this is one of the (ab)users doing things
this way.

(The other two spots in http.c which do a httpReplyParse() and storeAppend() now
do httpReplySwapOut(), which I'll change soon to implement the new behaviour.)

Adrian
Received on Tue Feb 13 2007 - 04:39:00 MST

This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:02 MST