Can anyone point me in the right direction? I have searched on the web
extensively but I did not find anything helpful.
On Wed, Sep 17, 2008 at 2:49 PM, Jason Fister <[EMAIL PROTECTED]> wrote:
> Hello folks,
> According to HTTP 1.1 spec, if a client sends a Expect: 100-continue header
> with a request, the server can inspect the header and reply with a HTTP
> status 100 Continue if its ready to accept the data. The client after
> receiving the 100 request will send the request body. The server is also
> allowed to send a final http status msg and close the connection after
> inspecting the headers if it doesn't want to accept the request body.
>
> I am trying to implement this in my apache module but am a little confused
> as to how to do this. Here is a section of the code:
>
> static int my_handler(request_rec* req)
> {
> .....
> .....
> .....
> bool sta = ShouldSrvrRespondWith100(req);
> if (tru==sta)
> {
> req->status = HTTP_CONTINUE;
> return OK;
> }
> else
> {
> ProcessRequest(req);
> }
> }
>
> The function 'ShouldSrvrRespondWith100' is defined as
>
> bool ShouldSrvrRespondWith100(request_rec* req)
> {
> if((HTTP ver is 1.1) && ('Expect' HTTP header is set))
> {
> return true;
> }
> else
> {
> return false;
> }
> }
>
>
> Am I doing this correctly? What is don't understand is I want to resume
> execution of the code from where I left off before I sent the 100 http
> status to the client - how do I achieve that?
>
> in the request_rec structure, there is a field called 'expecting_100'
> should I be checking this value in the request to see if this particular
> request is in response to a 100 continue from the server?
>
> Thanks!
> Jason
>