From db29f9ede14ff5b8d747230fcad8ffa1b157f1e1 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 7 Mar 2011 14:52:30 +0100 Subject: Adding missing "send loop" for raw sending. Also fixed some of the documentation (types). --- lib/inets/doc/src/httpc.xml | 52 ++++--- lib/inets/doc/src/notes.xml | 85 +++++++---- lib/inets/src/http_client/httpc.erl | 85 +++++++---- lib/inets/src/http_client/httpc_handler.erl | 18 +++ lib/inets/src/http_client/httpc_request.erl | 52 ++++--- lib/inets/test/httpc_SUITE.erl | 229 ++++++++++------------------ 6 files changed, 269 insertions(+), 252 deletions(-) (limited to 'lib') diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml index 6dcf2d6d17..12f4fa535e 100644 --- a/lib/inets/doc/src/httpc.xml +++ b/lib/inets/doc/src/httpc.xml @@ -76,25 +76,29 @@ socket_opt() = See the Options used by gen_tcp(3) and

For more information about HTTP see rfc 2616

send_fun_result(), acc()} | - {chunkify, fun(acc()) -> send_fun_result(), acc()} -send_fun_result() = eof | {ok, iolist(), acc()} -acc() = term() -filename() = string() +method() = head | get | put | post | trace | options | delete +request() = {url(), headers()} | + {url(), headers(), content_type(), body()} +url() = string() - Syntax according to the URI definition in rfc 2396, ex: "http://www.erlang.org" +status_line() = {http_version(), status_code(), reason_phrase()} +http_version() = string() ex: "HTTP/1.1" +status_code() = integer() +reason_phrase() = string() +content_type() = string() +headers() = [header()] +header() = {field(), value()} +field() = string() +value() = string() +body() = string() | + binary() | + {fun(accumulator()) -> body_processing_result(), + accumulator()} | + {chunkify, + fun(accumulator()) -> body_processing_result(), + accumulator()} +body_processing_result() = eof | {ok, iolist(), accumulator()} +accumulator() = term() +filename() = string() ]]> @@ -146,8 +150,9 @@ ssl_options() = {verify, code()} | Sends a get HTTP-request Url = url() - Result = {status_line(), headers(), body()} | - {status_code(), body()} | request_id() + Result = {status_line(), headers(), Body} | + {status_code(), Body} | request_id() + Body = string() | binary() Profile = profile() Reason = term() @@ -195,8 +200,9 @@ ssl_options() = {verify, code()} | Function = atom() Args = list() body_format() = string | binary - Result = {status_line(), headers(), body()} | - {status_code(), body()} | request_id() + Result = {status_line(), headers(), Body} | + {status_code(), Body} | request_id() + Body = string() | binary() Profile = profile() Reason = {connect_failed, term()} | {send_failed, term()} | term() diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index 11b0af4310..8c0d683a90 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -1,4 +1,4 @@ - + @@ -32,50 +32,80 @@ notes.xml -
Inets 5.5.1 +
Inets 5.6 -
Fixed Bugs and Malfunctions +
Improvements and New Features + -

Fix format_man_pages so it handles all man sections - and remove warnings/errors in various man pages.

-

- Own Id: OTP-8600

+

[httpc] Add support for upload body streaming (PUT and POST).

+

For more info, + see the definition of the Body argument of the + request/4,5 + function.

+

Filipe David Manana

+

Own Id: OTP-9094

+
+
+ +
Fixed Bugs and Malfunctions +

-

+ +
+
+ + +
Inets 5.5.1 +
Improvements and New Features -

- Miscellaneous inet6 related problems.

-

- Own Id: OTP-8927

+

Miscellaneous inet6 related problems.

+

Own Id: OTP-8927

-

- Updated http-server to make sure URLs in error-messages - are URL-encoded. Added support in http-client to use - URL-encoding. Also added the missing include directory - for the inets application.

-

- Own Id: OTP-8940 Aux Id: seq11735

+

Updated http-server to make sure URLs in error-messages + are URL-encoded. Added support in http-client to use + URL-encoding. Also added the missing include directory + for the inets application.

+

Own Id: OTP-8940, Aux Id: seq11735

-
+
Fixed Bugs and Malfunctions + + +

Fix format_man_pages so it handles all man sections + and remove warnings/errors in various man pages.

+

Own Id: OTP-8600

+
+ +

[httpc] Pipelined and queued requests not processed when + connection closed remotelly.

+

Own Id: OTP-8906

+
+
+
+ +
+ -
Inets 5.5 +
Inets 5.5
Fixed Bugs and Malfunctions @@ -120,9 +150,10 @@
-
+
+ -
Inets 5.4 +
Inets 5.4
Improvements and New Features