httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Fry" <>
Subject Re: sending provisional response codes from a filter
Date Thu, 07 Feb 2008 22:17:53 GMT
I've made some progress in ruling out some false alarms that revelaed
themselves initially. Specifically, the 103 I thought I was sending
was just my addition of 103 to http_protocol.c working improperly
(apparently even after httpd.h was updated, but nevermind that for
now). In any case, my current filter simply execuites the following
code, apparently to no avail:

            char *tmp;

            tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL, " ",
                              "103 Checkpoint", CRLF CRLF, NULL);
            e = apr_bucket_pool_create(tmp, strlen(tmp), f->r->pool,
            APR_BRIGADE_INSERT_HEAD(bb, e);
            e = apr_bucket_flush_create(f->c->bucket_alloc);
            APR_BRIGADE_INSERT_TAIL(bb, e);

            ap_pass_brigade(f->c->output_filters, bb);

Does something else need to be done/happening to allow me to send a
provisional response? This doesn't seem to work using
ap_get_status_line(100) instead of "103 Checkpoint" either.

Any thoughts or pointers would be appreciated.


On Feb 7, 2008 1:54 PM, Charles Fry <> wrote:
> Hi,
> We are working to prototype a protocol that requires multiple
> provisional response codes (103 in this case) to be sent to the
> client, serving as checkpoints for large client to server transfers.
> Being new to Apache module development, we are trying to determine the
> correct way to do this. So far I have an input filter which attempts
> to send a 103 by duplicating the code ti send 100s in
> modules/http/http_filters.c, and so far I've observed two types of
> unexpected behavior. First of all, the 103 turned into a 200 unless I
> added a new line for 103 to modules/http/http_protocol.c. So my first
> question is: is there a way to send 1xx response codes > 102 without
> modifying this?
> Second, even after adding 103s to http_protocol, and duplicating the
> 100 code from http_filters, the result was that rather than generating
> a 103 followed by the final response (200 in my tests), the the status
> code of the final response simply became 103.
> I'll continue reading through the code in my efforts to understand
> what is really going on, but I wanted to ping this list in case
> someone with deeper Apache understanding could help short-circuit my
> search.
> thanks,
> Charles

View raw message