[erlang-questions] bug in ibrowse handling of HEAD and DELETE

Chandru chandrashekhar.mullaparthi@REDACTED
Thu Oct 12 11:27:15 CEST 2006


Hi Chris,

Thanks for the bug report. I've made a fix and checked it into jungerl in
sourceforge. I've tested the fix and it works. I've done a bit of regression
testing and all looks ok.

cheers
Chandru

On 11/10/06, Chris Newcombe <chris.newcombe@REDACTED> wrote:
>
> Hi,
>
> I'm using ibrowse to access a web service.  (Thankyou for making it
> available!)
>
> I hit a bug when using HEAD or DELETE methods (i.e. those that don't
> return a response body).
>
> The HEAD or DELETE request succeeds, but the ibrowse gen_server's
> state is not fully reset, so the next request hangs for a timeout of
> 30+ seconds.
>
> I fixed this for my case with the patch below.
>
> However, I don't yet use the pipelined-request feature (I do requests
> one at a time). So I don't know if this is the truly correct fix.
> i.e. Perhaps State_2#state.cur_req should be set to the tail of of the
> request queue and not 'undefined'?  Sorry, I didn't have time to write
> tests to check that.
>
> regards,
>
> Chris Newcombe
>
> % diff ibrowse/src/ibrowse_http_client.erl.original
> ibrowse/src/ibrowse_http_client.erl
> 658c658
> <                   parse_response(Data_1, State_2#state{reqs=Reqs_1});
> ---
> >                   parse_response(Data_1, State_2#state{reqs=Reqs_1,
> cur_req=undefined});
> 679c679
> <                   parse_response(Data_1, State_2#state{reqs=Reqs_1});
> ---
> >                   parse_response(Data_1, State_2#state{reqs=Reqs_1,
> cur_req=undefined});
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061012/960008b1/attachment.htm>


More information about the erlang-questions mailing list