From d756a2b0b6a792639c5f4fad7db1fe461e6d3634 Mon Sep 17 00:00:00 2001
From: Chandrashekhar Mullaparthi
Date: Wed, 22 Sep 2010 23:01:52 +0100
Subject: [PATCH] Various changes. See README for details
---
README | 26 +++-
doc/ibrowse.html | 11 +-
src/ibrowse.erl | 79 ++++++++++--
src/ibrowse_http_client.erl | 236 +++++++++++++++++++++++-------------
src/ibrowse_lb.erl | 23 +++-
src/ibrowse_test.erl | 51 ++++++--
vsn.mk | 2 +-
7 files changed, 319 insertions(+), 109 deletions(-)
diff --git a/README b/README
index 8092c70..adb1d7d 100644
--- a/README
+++ b/README
@@ -18,12 +18,32 @@ ibrowse is available under two different licenses. LGPL or the BSD license.
Comments to : Chandrashekhar.Mullaparthi@gmail.com
-Version : 1.6.2
+Version : 2.0.0
Latest version : git://github.com/cmullaparthi/ibrowse.git
CONTRIBUTIONS & CHANGE HISTORY
==============================
+22-09-2010 - * Added option preserve_chunked_encoding. This allows the caller to get
+ the raw HTTP response when the Transfer-Encoding is Chunked. This feature
+ was requested by Benoit Chesneau who wanted to write a HTTP proxy using
+ ibrowse.
+ * Fixed bug with the {stream_to, {Pid, once}} option. Bug report and lot
+ of help from Filipe David Manana. Thank you Filipe.
+ * The {error, conn_failed} and {error, send_failed} return values are
+ now of the form {error, {conn_failed, Err}} and
+ {error, {send_failed, Err}}. This is so that the specific socket error
+ can be returned to the caller. I think it looks a bit ugly, but that
+ is the best compromise I could come up with.
+ * Added application configuration parameters default_max_sessions and
+ default_max_pipeline_size. These were previously hard coded to 10.
+ * Versioning of ibrowse now follows the Semantic Versioning principles.
+ See http://semver.org. Thanks to Anthony Molinaro for nudging me in
+ this direction.
+ * The connect_timeout option now only applies to the connection setup
+ phase. In previous versions, the time taken to setup the connection
+ was deducted from the specified timeout value for the request.
+
17-07-2010 - * Merged change made by Filipe David Manana to use the base64
module for encoding/decoding.
@@ -153,7 +173,7 @@ CONTRIBUTIONS & CHANGE HISTORY
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.
-13-11-2006 - Youns Hafri reported a bug where ibrowse was not returning the
+13-11-2006 - Youns 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
@@ -172,7 +192,7 @@ CONTRIBUTIONS & CHANGE HISTORY
22-Nov-2005 - Added ability to generate requests using the Chunked
Transfer-Encoding.
-08-May-2005 - Youns Hafri made a CRUX LINUX port of ibrowse.
+08-May-2005 - Youns Hafri made a CRUX LINUX port of ibrowse.
http://yhafri.club.fr/crux/index.html
Here are some usage examples. Enjoy!
diff --git a/doc/ibrowse.html b/doc/ibrowse.html
index 590ff9a..af65022 100644
--- a/doc/ibrowse.html
+++ b/doc/ibrowse.html
@@ -12,7 +12,7 @@
The ibrowse application implements an HTTP 1.1 client.
Copyright 2005-2010 Chandrashekhar Mullaparthi
-Version: 1.6.0
+Version: 2.0.0
Behaviours: gen_server.
Authors: Chandrashekhar Mullaparthi (chandrashekhar dot mullaparthi at gmail dot com).
@@ -202,7 +202,7 @@ send_req/4, send_req/5, send_req/6.
send_req(Url::string(), Headers::headerList(), Method::method(), Body::body(), Options::optionList()) -> response()
- optionList() = [option()]
-- option() = {max_sessions, integer()} | {response_format, response_format()} | {stream_chunk_size, integer()} | {max_pipeline_size, integer()} | {trace, boolean()} | {is_ssl, boolean()} | {ssl_options, [SSLOpt]} | {pool_name, atom()} | {proxy_host, string()} | {proxy_port, integer()} | {proxy_user, string()} | {proxy_password, string()} | {use_absolute_uri, boolean()} | {basic_auth, {username(), password()}} | {cookie, string()} | {content_length, integer()} | {content_type, string()} | {save_response_to_file, srtf()} | {stream_to, stream_to()} | {http_vsn, {MajorVsn, MinorVsn}} | {host_header, string()} | {inactivity_timeout, integer()} | {connect_timeout, integer()} | {socket_options, Sock_opts} | {transfer_encoding, {chunked, ChunkSize}} | {headers_as_is, boolean()} | {give_raw_headers, boolean()}
+- option() = {max_sessions, integer()} | {response_format, response_format()} | {stream_chunk_size, integer()} | {max_pipeline_size, integer()} | {trace, boolean()} | {is_ssl, boolean()} | {ssl_options, [SSLOpt]} | {pool_name, atom()} | {proxy_host, string()} | {proxy_port, integer()} | {proxy_user, string()} | {proxy_password, string()} | {use_absolute_uri, boolean()} | {basic_auth, {username(), password()}} | {cookie, string()} | {content_length, integer()} | {content_type, string()} | {save_response_to_file, srtf()} | {stream_to, stream_to()} | {http_vsn, {MajorVsn, MinorVsn}} | {host_header, string()} | {inactivity_timeout, integer()} | {connect_timeout, integer()} | {socket_options, Sock_opts} | {transfer_encoding, {chunked, ChunkSize}} | {headers_as_is, boolean()} | {give_raw_headers, boolean()} | {preserve_chunked_encoding, boolean()}
- stream_to() = process() | {process(), once}
- process() = pid() | atom()
- username() = string()
@@ -284,6 +284,11 @@ send_req/4, send_req/5, send_req/6.
caller to get access to the raw status line and raw unparsed
headers. Not quite sure why someone would want this, but one of my
users asked for it, so here it is.
+
+ - The
preserve_chunked_encoding
option enables the caller
+ to receive the raw data stream when the Transfer-Encoding of the server
+ response is Chunked.
+
@@ -441,6 +446,6 @@ send_req/4, send_req/5, send_req/6.
-
Generated by EDoc, May 17 2010, 23:21:42.
+
Generated by EDoc, Sep 22 2010, 22:56:44.