[erlang-questions] Bug in Inets handling of PUT?

Ingela Anderton ingela@REDACTED
Wed Oct 18 08:25:55 CEST 2006



You are right it is a bug in inets. However it is already fixed. (It
has been reported before.) It will be part of the next open source
release.


YouI'm calling a web service with a PUT via http:request/6.  The PUT results in
a 200 and a content length of zero.  The zero-length response seems to be
causing the request to hang until the keepalive timeout expires and the
socket closes.  If I make the change below then the PUT works perfectly:

diff httpc_response.erl httpc_response.erl.original 
61c61
< 	N when N >= Length ->
---
> 	N when N >= Length, Length > 0 ->

I'm new to Erlang so please point me in the right direction if I'm off base.
 I've checked the RFC and it seems valid for a PUT to have a zero-length
response.  Oh, and I tried this in ibrowse and it worked perfectly, but I'd
much rather use a built-in if possible.

Any tips on solving this are greatly appreciated.

Thanks,


-- 
m.v.h Ingela

//The highway of life is always under construction. //

 	        |\      _,,,--,,_  ,)
                /,`.-'`'   -,  ;-;;' 
               |,4-  ) )-,_ ) /\
              '---''(_/--' (_/-'

Ericsson AB - OTP team








More information about the erlang-questions mailing list