[erlang-questions] bug in ibrowse handling of HEAD and DELETE
Chris Newcombe
chris.newcombe@REDACTED
Wed Oct 11 23:00:07 CEST 2006
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});
More information about the erlang-questions
mailing list