check for {sync,true} and {stream,{self,once}} in HTTP client

View: New views
1 Messages — Rating Filter:   Alert me  

check for {sync,true} and {stream,{self,once}} in HTTP client

by Adam Kocoloski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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),


________________________________________________________________
erlang-patches mailing list. See http://www.erlang.org/faq.html
erlang-patches (at) erlang.org