<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>BSD_LICENSE</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-$Id: README,v 1.5 2006/10/12 09:25:29 chandrusf Exp $
+$Id: README,v 1.6 2006/11/13 20:41:36 chandrusf Exp $
 
 ibrowse is a HTTP client. The following are a list of features.
 	- RFC2616 compliant (AFAIK) 
@@ -15,23 +15,33 @@ ibrowse is a HTTP client. The following are a list of features.
 	- Can talk to Secure webservers using SSL
 	- any other features in the code not listed here :)
 
+ibrowse is available under two different licenses. LGPL and the BSD license.
+
 Comments to : Chandrashekhar.Mullaparthi@t-mobile.co.uk
 
 CONTRIBUTIONS &amp; CHANGE HISTORY
 ==============================
-08-May-2005 - Youn*s Hafri made a CRUX LINUX port of ibrowse.
-	      http://yhafri.club.fr/crux/index.html
+13-11-2006 -  Youn*s Hafri reported a bug where ibrowse was not returning the 
+                temporary filename when the server was closing the connection 
+                after sending the data (as in HTTP/1.0).
+              Released ibrowse under the BSD license
 
-22-Nov-2005 - Added ability to generate requests using the Chunked 
-              Transfer-Encoding.
+12-10-2006 -  Chris Newcombe reported bug in dealing with requests where no 
+              body is expected in the response. The first request would succeed
+              and the next request would hang.
+
+24-May-2006 - Sean Hinde reported a bug. Async responses with pipelining was 
+              returning the wrong result.
 
 08-Dec-2005 - Richard Cameron (camster@citeulike.org). Patch to ibrowse to
               prevent port number being included in the Host header when port
               80 is intended.
 
-12-10-2006 -  Chris Newcombe reported bug in dealing with requests where no 
-              body is expected in the response. The first request would succeed
-              and the next request would hang.
+22-Nov-2005 - Added ability to generate requests using the Chunked 
+              Transfer-Encoding.
+
+08-May-2005 - Youn*s Hafri made a CRUX LINUX port of ibrowse.
+	      http://yhafri.club.fr/crux/index.html
 
 Here are some usage examples. Enjoy!
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@
 %%% Created : 11 Oct 2003 by Chandrashekhar Mullaparthi &lt;chandrashekhar.mullaparthi@t-mobile.co.uk&gt;
 %%%-------------------------------------------------------------------
 -module(ibrowse_http_client).
--vsn('$Id: ibrowse_http_client.erl,v 1.7 2006/10/12 09:25:30 chandrusf Exp $ ').
+-vsn('$Id: ibrowse_http_client.erl,v 1.8 2006/11/13 20:41:36 chandrusf Exp $ ').
 
 -behaviour(gen_server).
 %%--------------------------------------------------------------------
@@ -410,13 +410,22 @@ handle_sock_closed(#state{cur_req=undefined}) -&gt;
 %% of response. There maybe requests pipelined which need a response.
 handle_sock_closed(#state{reply_buffer=Buf, reqs=Reqs, http_status_code=SC,
 			  is_closing=IsClosing, cur_req=CurReq,
+			  tmp_file_name=TmpFilename, tmp_file_fd=Fd,
 			  status=get_body, recvd_headers=Headers}=State) -&gt;
     #request{from=From, stream_to=StreamTo, req_id=ReqId} = CurReq,
     case IsClosing of
 	true -&gt;
 	    {_, Reqs_1} = queue:out(Reqs),
-%	    {{value, Req}, Reqs_1} = queue:out(Reqs),
-	    do_reply(From, StreamTo, ReqId, {ok, SC, Headers, lists:flatten(lists:reverse(Buf))}),
+	    case TmpFilename of
+		undefined -&gt;
+		    do_reply(From, StreamTo, ReqId,
+			     {ok, SC, Headers,
+			      lists:flatten(lists:reverse(Buf))});
+		_ -&gt;
+		    file:close(Fd),
+		    do_reply(From, StreamTo, ReqId,
+			     {ok, SC, Headers, {file, TmpFilename}})
+	    end,
 	    do_error_reply(State#state{reqs = Reqs_1}, connection_closed);
 	_ -&gt;
 	    do_error_reply(State, connection_closed)
@@ -858,9 +867,9 @@ handle_response(#request{from=From, stream_to=StreamTo, req_id=ReqId},
 		       send_timer=ReqTimer,
 		       recvd_headers = RespHeaders}=State) -&gt;
     State_1 = set_cur_request(State),
+    file:close(Fd),
     do_reply(From, StreamTo, ReqId, {ok, SCode, RespHeaders, {file, TmpFilename}}),
     cancel_timer(ReqTimer, {eat_message, {req_timedout, From}}),
-    file:close(Fd),
     State_1#state{tmp_file_name=undefined, tmp_file_fd=undefined};
 handle_response(#request{from=From, stream_to=StreamTo, req_id=ReqId},
 		#state{http_status_code=SCode, recvd_headers=RespHeaders,</diff>
      <filename>src/ibrowse_http_client.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
-IBROWSE_VSN = 1.2.2
+IBROWSE_VSN = 1.2.3
 </diff>
      <filename>vsn.mk</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>31bd1f4926398ffa32256dc056ce10c182701cd7</id>
    </parent>
  </parents>
  <author>
    <name>chandrusf</name>
    <email>chandrusf</email>
  </author>
  <url>http://github.com/cmullaparthi/ibrowse/commit/f39609df9458a7ccfc986b8d83beba5a0665680e</url>
  <id>f39609df9458a7ccfc986b8d83beba5a0665680e</id>
  <committed-date>2006-11-13T12:41:36-08:00</committed-date>
  <authored-date>2006-11-13T12:41:36-08:00</authored-date>
  <message>Release under BSD license. Fix for bug reported by Younes Hafri. See README for more details</message>
  <tree>35de83116e5deb11ddf99112b0719fd37c1e13a7</tree>
  <committer>
    <name>chandrusf</name>
    <email>chandrusf</email>
  </committer>
</commit>
