diff options
Diffstat (limited to 'lib/inets/doc')
-rw-r--r-- | lib/inets/doc/src/httpc.xml | 48 | ||||
-rw-r--r-- | lib/inets/doc/src/mod_esi.xml | 29 | ||||
-rw-r--r-- | lib/inets/doc/src/notes.xml | 39 |
3 files changed, 75 insertions, 41 deletions
diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml index 8f68087871..532f5eefde 100644 --- a/lib/inets/doc/src/httpc.xml +++ b/lib/inets/doc/src/httpc.xml @@ -76,21 +76,29 @@ socket_opt() = See the Options used by gen_tcp(3) and <p>For more information about HTTP see rfc 2616</p> <code type="none"><![CDATA[ -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() -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() ]]></code> </section> @@ -142,8 +150,9 @@ ssl_options() = {verify, code()} | <fsummary>Sends a get HTTP-request</fsummary> <type> <v>Url = url() </v> - <v>Result = {status_line(), headers(), body()} | - {status_code(), body()} | request_id() </v> + <v>Result = {status_line(), headers(), Body} | + {status_code(), Body} | request_id() </v> + <v>Body = string() | binary()</v> <v>Profile = profile()</v> <v>Reason = term() </v> </type> @@ -191,8 +200,9 @@ ssl_options() = {verify, code()} | <v>Function = atom() </v> <v>Args = list() </v> <v>body_format() = string | binary </v> - <v>Result = {status_line(), headers(), body()} | - {status_code(), body()} | request_id() </v> + <v>Result = {status_line(), headers(), Body} | + {status_code(), Body} | request_id() </v> + <v>Body = string() | binary()</v> <v>Profile = profile() </v> <v>Reason = {connect_failed, term()} | {send_failed, term()} | term() </v> diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml index 3c473d3f94..7b1e93e313 100644 --- a/lib/inets/doc/src/mod_esi.xml +++ b/lib/inets/doc/src/mod_esi.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1997</year><year>2010</year> + <year>1997</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -32,16 +32,19 @@ <modulesummary>Erlang Server Interface </modulesummary> <description> <p>This module defines the API - Erlang Server Interface (ESI). - Which is a more efficient way of writing erlang scripts - for your Inets web server than writing them as common CGI scripts.</p> + Which is a more efficient way of writing erlang scripts + for your Inets web server than writing them as common CGI scripts.</p> + + <marker id="deliver"></marker> </description> + <funcs> <func> <name>deliver(SessionID, Data) -> ok | {error, Reason}</name> <fsummary>Sends Data back to client.</fsummary> <type> <v>SessionID = term()</v> - <v>Data = string() | io_list()</v> + <v>Data = string() | io_list() | binary()</v> <v>Reason = term()</v> </type> <desc> @@ -51,13 +54,15 @@ parts of the content to the user.</p> <p>Sends data from a Erl Scheme script back to the client.</p> - <note><p>Note - that if any HTTP-header fields should be added by the - script they must be in the first call to deliver/2 and the - data in the call must be a string. Do not - assume anything about the data type of SessionID, the - SessionID must be the value given as input to the esi - call back function that you implemented.</p></note> + <note> + <p>Note that if any HTTP-header fields should be added by the + script they must be in the first call to deliver/2 and the + data in the call must be a string. Calls after the headers + are complete may contain binary data to reduce copying + overhead. Do not assume anything about the data type of + SessionID, the SessionID must be the value given as input to + the esi call back function that you implemented.</p> + </note> </desc> </func> </funcs> diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index 5dbe761988..05b5f6b6e8 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -38,9 +38,31 @@ <!-- <p>-</p> --> - <list> <item> + <p>[httpc] Add support for upload body streaming (PUT and POST).</p> + <p>For more info, + see the definition of the <c>Body</c> argument of the + <seealso marker="httpc#request2">request/4,5</seealso> + function. </p> + <p>Filipe David Manana</p> + <p>Own Id: OTP-9094</p> + </item> + + <item> + <p>[ftp] Added (type) spec for all exported functions.</p> + <p>Own Id: OTP-9114 Aux Id: seq11799</p> + </item> + + <item> + <p>[httpd] + <seealso marker="mod_esi#deliver">mod_esi:deliver/2</seealso> + made to accept binary data. </p> + <p>Bernard Duggan</p> + <p>Own Id: OTP-9123</p> + </item> + + <item> <p>[httpd] Prevent XSS in error pages. Prevent user controlled input from being interpreted as HTML in error pages by encoding the reserved HTML @@ -48,28 +70,25 @@ <p>Michael Santos</p> <p>Own Id: OTP-9124</p> </item> - </list> + </list> </section> <section><title>Fixed Bugs and Malfunctions</title> <p>-</p> + <!-- <list> <item> - <p>[httpd] httpd_response:send_chunk handles empty list and - empty binary - i.e. no chunk is sent, but it does - not handle a list with an empty binary [<<>>]. - This will be sent as an empty chunk - which in turn - will be encoded by http_chunk to the same as a final - chunk, which will make the http client believe that - the end of the page is reached.</p> - <p>Own Id: OTP-8906</p> + <p>[httpc] Pipelined and queued requests not processed when + connection closed remotelly.</p> + <p>Own Id: OTP-8906</p> </item> </list> --> </section> + </section> <!-- 5.6 --> |