Browse Source

Fixed bug with the save_response_to_file option.

pull/35/head v2.1.4
Chandrashekhar Mullaparthi 14 years ago
parent
commit
6ed0f3efee
3 changed files with 15 additions and 5 deletions
  1. +9
    -3
      README
  2. +0
    -1
      src/ibrowse.erl
  3. +6
    -1
      src/ibrowse_http_client.erl

+ 9
- 3
README View File

@ -18,7 +18,7 @@ ibrowse is available under two different licenses. LGPL or the BSD license.
Comments to : Chandrashekhar.Mullaparthi@gmail.com Comments to : Chandrashekhar.Mullaparthi@gmail.com
Version : 2.1.3
Version : 2.1.4
Latest version : git://github.com/cmullaparthi/ibrowse.git Latest version : git://github.com/cmullaparthi/ibrowse.git
@ -51,6 +51,7 @@ Paul J. Davis
Peter Kristensen Peter Kristensen
Ram Krishnan Ram Krishnan
Richard Cameron Richard Cameron
Ryan Zezeski
Sean Hinde Sean Hinde
Seth Falcon Seth Falcon
Steve Vinoski Steve Vinoski
@ -61,6 +62,11 @@ tholschuh (https://github.com/tholschuh/)
CONTRIBUTIONS & CHANGE HISTORY CONTRIBUTIONS & CHANGE HISTORY
============================== ==============================
09-02-2011 - v2.1.4
* Fixed a bug reported by Ryan Zezeski with the
save_response_to_file option.
https://github.com/cmullaparthi/ibrowse/issues#issue/33
16-01-2011 - v2.1.3 16-01-2011 - v2.1.3
* Fixed issues with streaming and chunked responses when using * Fixed issues with streaming and chunked responses when using
the 'caller controls socket' feature. See following links for the 'caller controls socket' feature. See following links for
@ -297,7 +303,7 @@ CONTRIBUTIONS & CHANGE HISTORY
12-01-2007 - Derek Upham sent in a bug fix. The reset_state function was not 12-01-2007 - Derek Upham sent in a bug fix. The reset_state function was not
behaving correctly when the transfer encoding was not chunked. behaving correctly when the transfer encoding was not chunked.
13-11-2006 - Youn�s Hafri reported a bug where ibrowse was not returning the
13-11-2006 - Youn�s Hafri reported a bug where ibrowse was not returning the
temporary filename when the server was closing the connection temporary filename when the server was closing the connection
after sending the data (as in HTTP/1.0). after sending the data (as in HTTP/1.0).
Released ibrowse under the BSD license Released ibrowse under the BSD license
@ -316,7 +322,7 @@ CONTRIBUTIONS & CHANGE HISTORY
22-Nov-2005 - Added ability to generate requests using the Chunked 22-Nov-2005 - Added ability to generate requests using the Chunked
Transfer-Encoding. Transfer-Encoding.
08-May-2005 - Youn�s Hafri made a CRUX LINUX port of ibrowse.
08-May-2005 - Youn�s Hafri made a CRUX LINUX port of ibrowse.
http://yhafri.club.fr/crux/index.html http://yhafri.club.fr/crux/index.html
Here are some usage examples. Enjoy! Here are some usage examples. Enjoy!

+ 0
- 1
src/ibrowse.erl View File

@ -7,7 +7,6 @@
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
%% @author Chandrashekhar Mullaparthi <chandrashekhar dot mullaparthi at gmail dot com> %% @author Chandrashekhar Mullaparthi <chandrashekhar dot mullaparthi at gmail dot com>
%% @copyright 2005-2011 Chandrashekhar Mullaparthi %% @copyright 2005-2011 Chandrashekhar Mullaparthi
%% @version 2.1.3
%% @doc The ibrowse application implements an HTTP 1.1 client in erlang. This %% @doc The ibrowse application implements an HTTP 1.1 client in erlang. This
%% module implements the API of the HTTP client. There is one named %% module implements the API of the HTTP client. There is one named
%% process called 'ibrowse' which assists in load balancing and maintaining configuration. There is one load balancing process per unique webserver. There is %% process called 'ibrowse' which assists in load balancing and maintaining configuration. There is one load balancing process per unique webserver. There is

+ 6
- 1
src/ibrowse_http_client.erl View File

@ -1278,7 +1278,12 @@ handle_response(#request{from=From, stream_to=StreamTo, req_id=ReqId,
reply_buffer = RepBuf, reply_buffer = RepBuf,
recvd_headers = RespHeaders}=State) when SaveResponseToFile /= false -> recvd_headers = RespHeaders}=State) when SaveResponseToFile /= false ->
Body = RepBuf, Body = RepBuf,
ok = file:close(Fd),
case Fd of
undefined ->
ok;
_ ->
ok = file:close(Fd)
end,
ResponseBody = case TmpFilename of ResponseBody = case TmpFilename of
undefined -> undefined ->
Body; Body;

Loading…
Cancel
Save