Bug in

Joe Armstrong joe@REDACTED
Thu Mar 11 13:29:20 CET 2004


   I'm not sure if this is bug ....

   I'm using the *undocumented* http.erl in inets

   If I have some process P and call

	http:start()

   followed by 
 
	 http:request_sync(...)

   Then if any other message is sent to P *before* request_sync has terminated
then I get a fatal errror.

   To fix otp_src_R9C-0/lib/inets/src/http.erl

   change line 182

	receive
		{'$gen_cast',{request_sync,_ReqId2,{Status,Headers,Body}}} ->
		    {Status,pp_headers(Headers),binary_to_list(Body)};
		{'$gen_cast',{request_sync,_ReqId2,{error,Reason}}} ->
		    {error,Reason};
	        Error ->
		     Error
	    end;
  
   to


	receive
		{'$gen_cast',{request_sync,_ReqId2,{Status,Headers,Body}}} ->
		    {Status,pp_headers(Headers),binary_to_list(Body)};
		{'$gen_cast',{request_sync,_ReqId2,{error,Reason}}} ->
		    {error,Reason} 
	    end;

   Which seems to fix the problem

  /Joe







More information about the erlang-questions mailing list