check for {sync,true} and {stream,{self,once}} in HTTP client
Adam Kocoloski
adam.kocoloski@REDACTED
Thu Jun 11 21:14:35 CEST 2009
Hi, it looks like the HTTP client checks for the combo of {sync,true}
and {stream,self} and returns an error, but if {stream,{self,once}} is
used instead the process will just hang. Here's a simple patch. Best,
Adam
diff --git a/lib/inets/src/http_client/http.erl b/lib/inets/src/
http_client/http.erl
index b545ef2..ebfa444 100644
--- a/lib/inets/src/http_client/http.erl
+++ b/lib/inets/src/http_client/http.erl
@@ -271,6 +271,8 @@ handle_request(Method, Url, {{Scheme, UserInfo,
Host, Port, Path, Query},
case {Sync, Stream} of
{true, self} ->
{error, streaming_error};
+ {true, {self,once}} ->
+ {error, streaming_error};
_ ->
RecordHeaders = header_record(NewHeaders, #http_request_h{},
Host, Version),
More information about the erlang-patches
mailing list