diff options
Diffstat (limited to 'lib/inets/doc')
-rw-r--r-- | lib/inets/doc/src/Makefile | 58 | ||||
-rw-r--r-- | lib/inets/doc/src/ftp.xml | 16 | ||||
-rw-r--r-- | lib/inets/doc/src/http_client.xml | 31 | ||||
-rw-r--r-- | lib/inets/doc/src/http_server.xml | 101 | ||||
-rw-r--r-- | lib/inets/doc/src/httpc.xml (renamed from lib/inets/doc/src/http.xml) | 249 | ||||
-rw-r--r-- | lib/inets/doc/src/httpd.xml | 48 | ||||
-rw-r--r-- | lib/inets/doc/src/httpd_util.xml | 15 | ||||
-rw-r--r-- | lib/inets/doc/src/inets.xml | 22 | ||||
-rw-r--r-- | lib/inets/doc/src/make.dep | 22 | ||||
-rw-r--r-- | lib/inets/doc/src/mod_esi.xml | 8 | ||||
-rw-r--r-- | lib/inets/doc/src/mod_security.xml | 17 | ||||
-rw-r--r-- | lib/inets/doc/src/notes.xml | 430 | ||||
-rw-r--r-- | lib/inets/doc/src/notes_history.xml | 24 | ||||
-rw-r--r-- | lib/inets/doc/src/ref_man.xml | 8 |
14 files changed, 810 insertions, 239 deletions
diff --git a/lib/inets/doc/src/Makefile b/lib/inets/doc/src/Makefile index 5b5a818db8..e4cb0c4e48 100644 --- a/lib/inets/doc/src/Makefile +++ b/lib/inets/doc/src/Makefile @@ -1,19 +1,19 @@ # # %CopyrightBegin% -# -# Copyright Ericsson AB 1997-2009. All Rights Reserved. -# +# +# Copyright Ericsson AB 1997-2010. All Rights Reserved. +# # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in # compliance with the License. You should have received a copy of the # Erlang Public License along with this software. If not, it can be # retrieved online at http://www.erlang.org/. -# +# # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See # the License for the specific language governing rights and limitations # under the License. -# +# # %CopyrightEnd% # # @@ -25,7 +25,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk # ---------------------------------------------------- include ../../vsn.mk VSN=$(INETS_VSN) -APPLICATION=inets + # ---------------------------------------------------- # Include dependency @@ -35,11 +35,13 @@ ifndef DOCSUPPORT include make.dep endif + # ---------------------------------------------------- # Release directory specification # ---------------------------------------------------- RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) + # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -56,7 +58,7 @@ XML_REF3_FILES = \ inets.xml \ ftp.xml \ tftp.xml \ - http.xml\ + httpc.xml\ httpd.xml \ httpd_conf.xml \ httpd_socket.xml \ @@ -67,41 +69,29 @@ XML_REF3_FILES = \ mod_security.xml XML_PART_FILES = \ - part.xml \ - part_notes.xml \ - part_notes_history.xml -XML_HTML_FILES = \ - notes_history.xml + part.xml BOOK_FILES = book.xml -XML_FILES = $(BOOK_FILES) \ - $(XML_CHAPTER_FILES) \ - $(XML_PART_FILES) \ - $(XML_REF6_FILES) \ - $(XML_REF3_FILES) \ - $(XML_APPLICATION_FILES) +XML_FILES = \ + $(BOOK_FILES) \ + $(XML_CHAPTER_FILES) \ + $(XML_PART_FILES) \ + $(XML_REF6_FILES) \ + $(XML_REF3_FILES) \ + $(XML_APPLICATION_FILES) -GIF_FILES = \ - inets.gif \ - notes.gif \ - ref_man.gif \ - book.gif \ - warning.gif \ - note.gif +# GIF_FILES = inets.gif # ---------------------------------------------------- HTML_FILES = \ $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ - $(XML_HTML_FILES:%.xml=$(HTMLDIR)/%.html) \ $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) INFO_FILE = ../../info EXTRA_FILES = summary.html.src \ - $(DEFAULT_GIF_FILES) \ - $(DEFAULT_HTML_FILES) \ $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \ $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \ $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) @@ -208,6 +198,7 @@ clean_html: clean_man: rm -f $(MAN3_FILES) + # ---------------------------------------------------- # Release Target # ---------------------------------------------------- @@ -216,11 +207,11 @@ include $(ERL_TOP)/make/otp_release_targets.mk ifdef DOCSUPPORT release_docs_spec: docs + @echo "release_docs_spec(docs) when DOCSUPPORT=$DOCSUPPORT" $(INSTALL_DIR) $(RELSYSDIR)/doc/pdf $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf $(INSTALL_DIR) $(RELSYSDIR)/doc/html - $(INSTALL_DATA) $(HTMLDIR)/* \ - $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(HTMLDIR)/* $(RELSYSDIR)/doc/html $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR) $(INSTALL_DIR) $(RELEASE_PATH)/man/man3 $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3 @@ -228,15 +219,18 @@ else ifeq ($(DOCTYPE),pdf) release_docs_spec: pdf + @echo "release_docs_spec(pdf)" $(INSTALL_DIR) $(RELEASE_PATH)/pdf $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELEASE_PATH)/pdf else ifeq ($(DOCTYPE),ps) release_docs_spec: ps + @echo "release_docs_spec(ps)" $(INSTALL_DIR) $(RELEASE_PATH)/ps $(INSTALL_DATA) $(TOP_PS_FILE) $(RELEASE_PATH)/ps else release_docs_spec: docs + @echo "release_docs_spec(docs)" $(INSTALL_DIR) $(RELSYSDIR)/doc/html $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTML_FILES) \ $(RELSYSDIR)/doc/html @@ -260,10 +254,6 @@ info: @echo "" @echo "TOP_HTML_FILES:\n$(TOP_HTML_FILES)" @echo "" - @echo "DEFAULT_GIF_FILES:\n$(DEFAULT_GIF_FILES)" - @echo "" - @echo "DEFAULT_HTML_FILES:\n$(DEFAULT_HTML_FILES)" - @echo "" @echo "XML_REF3_FILES:\n$(XML_REF3_FILES)" @echo "" @echo "XML_REF6_FILES:\n$(XML_REF6_FILES)" diff --git a/lib/inets/doc/src/ftp.xml b/lib/inets/doc/src/ftp.xml index 9ecca3dde1..25dfe716fc 100644 --- a/lib/inets/doc/src/ftp.xml +++ b/lib/inets/doc/src/ftp.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>ftp</title> @@ -534,12 +534,14 @@ <fsummary>Start an standalone ftp client.</fsummary> <type> <v>Host = string() | ip_address()</v> - <v>Opts = start_options() | open_options()</v> - <v>start_options() = [start_option()]</v> + <v>Opts = options()</v> + <v>options() = [option()]</v> + <v>option() = start_option() | open_option()</v> + <!-- <v>start_options() = [start_option()]</v> --> <v>start_option() = {verbose, verbose()} | {debug, debug()}</v> <v>verbose() = boolean() (defaults to false)</v> <v>debug() = disable | debug | trace (defaults to disable)</v> - <v>open_options() = [open_option()]</v> + <!-- <v>open_options() = [open_option()]</v> --> <v>open_option() = {ipfamily, ipfamily()} | {port, port()} | {mode, mode()} | {timeout, timeout()} | {progress, progress()}</v> <v>ipfamily() = inet | inet6 | inet6fb4 (defaults to inet)</v> <v>port() = integer() > 0 (defaults to 21)</v> @@ -845,7 +847,7 @@ <type> <v>Pid = pid()</v> <v>Command = string()</v> - <v>FTPLine = string() - Note the telnet end of line characters, from the ftp protocol definition, CRLF e.g. "\\r\ " has been removed.</v> + <v>FTPLine = string() - Note the telnet end of line characters, from the ftp protocol definition, CRLF e.g. "\\r\\n" has been removed.</v> </type> <desc> <p>Sends an arbitrary FTP command and returns verbatimly a list diff --git a/lib/inets/doc/src/http_client.xml b/lib/inets/doc/src/http_client.xml index 510c30eb35..49327ca80f 100644 --- a/lib/inets/doc/src/http_client.xml +++ b/lib/inets/doc/src/http_client.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -56,8 +56,8 @@ <pre> [{inets, [{services, [{httpc, PropertyList}]}]}] </pre> - <p>For valid properties see <seealso - marker="http">http(3)</seealso></p> + <p>For valid properties see + <seealso marker="httpc">httpc(3)</seealso>. </p> </section> <section> @@ -71,67 +71,66 @@ but not for requests to localhost. This will apply to all subsequent requests</p> <code type="erl"> - 2 > http:set_options([{proxy, {{"www-proxy.mycompany.com", 8000}, + 2 > httpc:set_options([{proxy, {{"www-proxy.mycompany.com", 8000}, ["localhost"]}}]). ok </code> <p>An ordinary synchronous request. </p> <code type="erl"> 3 > {ok, {{Version, 200, ReasonPhrase}, Headers, Body}} = - http:request(get, {"http://www.erlang.org", []}, [], []). + httpc:request(get, {"http://www.erlang.org", []}, [], []). </code> <p>With all default values, as above, a get request can also be written like this.</p> <code type="erl"> 4 > {ok, {{Version, 200, ReasonPhrase}, Headers, Body}} = - http:request("http://www.erlang.org"). + httpc:request("http://www.erlang.org"). </code> <p>An ordinary asynchronous request. The result will be sent to the calling process on the form {http, {ReqestId, Result}}</p> <code type="erl"> 5 > {ok, RequestId} = - http:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]). + httpc:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]). </code> <p>In this case the calling process is the shell, so we receive the result.</p> <code type="erl"> - 6 > receive {http, {RequestId, Result}} -> ok after 500 -> error end. + 6 > receive {http, {RequestId, Result}} -> ok after 500 -> error end. ok </code> <p>Send a request with a specified connection header. </p> <code type="erl"> 7 > {ok, {{NewVersion, 200, NewReasonPhrase}, NewHeaders, NewBody}} = - http:request(get, {"http://www.erlang.org", [{"connection", "close"}]}, + httpc:request(get, {"http://www.erlang.org", [{"connection", "close"}]}, [], []). </code> <p>Start a HTTP client profile. </p> <code><![CDATA[ - 8 > {ok, Pid} = inets:start(httpc, [{profile, foo}]). + 8 > {ok, Pid} = inets:start(httpc, [{profile, foo}]). {ok, <0.45.0>} ]]></code> <p>The new profile has no proxy settings so the connection will be refused</p> <code type="erl"> - 9 > http:request("http://www.erlang.org", foo). - {error,econnrefused} + 9 > httpc:request("http://www.erlang.org", foo). + {error, econnrefused} </code> <p>Stop a HTTP client profile. </p> <code type="erl"> - 10 > inets:stop(httpc, foo). + 10 > inets:stop(httpc, foo). ok </code> <p>Alternatively:</p> <code type="erl"> - 10 > inets:stop(httpc, Pid). + 10 > inets:stop(httpc, Pid). ok </code> - </section> </chapter> diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index 56317d647c..68dfd1add0 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>HTTP server </title> @@ -30,6 +30,8 @@ <date></date> <rev></rev> <file>http_server.xml</file> + + <marker id="intro"></marker> </header> <section> @@ -65,6 +67,8 @@ Server API. This API can be used to advantage by all who wants to enhance the server core functionality, for example custom logging and authentication.</p> + + <marker id="config"></marker> </section> <section> @@ -82,7 +86,7 @@ <p>The server is configured using an erlang property list. For the available properties see - <seealso marker="inets:inets">httpd(3)</seealso> + <seealso marker="httpd">httpd(3)</seealso> For backwards compatibility also apache-like config files are supported. </p> @@ -109,6 +113,8 @@ functions or only exported functions on chosen modules.</p> <p>{accept_timeout, integer()} sets the wanted timeout value for the server to set up a request connection.</p> + + <marker id="using_http_server_api"></marker> </section> <section> @@ -173,6 +179,7 @@ the ip address reported by the info function and can not be the hostname that is allowed when inputting bind_address.</p> + <marker id="htaccess"></marker> </section> <section> @@ -246,7 +253,7 @@ every row contains the name of the group and the members of the group separated by a space, for example:</p> <pre> -\011 GroupName: Member1 Member2 .... MemberN +GroupName: Member1 Member2 .... MemberN </pre> </item> <item> @@ -278,8 +285,8 @@ and every row contains User Name and Password separated by a colon, for example:</p> <pre> -\011 UserName:Password -\011 UserName:Password +UserName:Password +UserName:Password </pre> </item> <item> @@ -299,11 +306,11 @@ the specified methods. If no request method is specified all request methods are verified against the restrictions.</p> <pre> -\011 <Limit POST GET HEAD> -\011 order allow deny -\011 require group group1 -\011 allow from 123.145.244.5 -\011 </Limit> +<Limit POST GET HEAD> + order allow deny + require group group1 + allow from 123.145.244.5 +</Limit> </pre> </item> <item> @@ -337,6 +344,8 @@ </item> </list> </section> + + <marker id="dynamic_we_pages"></marker> </section> <section> @@ -357,18 +366,16 @@ <p>The mod_cgi module makes it possible to execute CGI scripts in the server. A file that matches the definition of a ScriptAlias config directive is treated as a CGI script. A CGI - script is executed by the server and it's output is returned to + script is executed by the server and its output is returned to the client. </p> <p>The CGI Script response comprises a message-header and a message-body, separated by a blank line. The message-header contains one or more header fields. The body may be empty. Example: </p> - <code type="none"> -"Content-Type:text/plain\ -Accept-Ranges:none\ -\ -some very -\011plain text" </code> + + <code>"Content-Type:text/plain\nAccept-Ranges:none\n\nsome very + plain text" </code> + <p>The server will interpret the cgi-headers and most of them will be transformed into HTTP headers and sent back to the client together with the body.</p> @@ -387,7 +394,7 @@ some very the extra overhead. An URL which calls an Erlang erl function has the following syntax (regular expression): </p> <code type="none"> -\011 http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo) +http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo) </code> <p>*** above depends on how the ErlScriptAlias config directive has been used</p> @@ -428,7 +435,7 @@ http://your.server.org/***/Mod:Func(Arg1,...,ArgN) http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[]))) </code> <p>which effectively will close down the Erlang node, - that is use the erl scheme instead, until this + therefor, use the erl scheme instead, until this security breach has been fixed.</p> <p>Today there are no good way of solving this problem and therefore Eval Scheme may be removed in future @@ -436,6 +443,8 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ </note> </section> </section> + + <marker id="logging"></marker> </section> <section> @@ -469,6 +478,8 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ </p> <p><em>[date]</em> access to <em>path</em> failed for <em>remotehost</em>, reason: <em>reason</em></p> + + <marker id="ssi"></marker> </section> <section> @@ -498,14 +509,14 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ for parsed files, for example: </p> <pre> -\011text/x-server-parsed-html shtml shtm + text/x-server-parsed-html shtml shtm </pre> <p>This makes files ending with <c>.shtml</c> and <c>.shtm</c> into parsed files. Alternatively, if the performance hit is not a problem, <em>all</em> HTML pages can be marked as parsed: </p> <pre> -\011text/x-server-parsed-html html htm + text/x-server-parsed-html html htm </pre> </section> @@ -518,7 +529,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ unparsed. Each directive has the following format: </p> <pre> -\011<!--#command tag1="value1" tag2="value2" --> + <!--#command tag1="value1" tag2="value2" --> </pre> <p>Each command takes different arguments, most only accept one tag at a time. Here is a breakdown of the commands and their @@ -612,7 +623,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ <item> <p>The unescaped version of any search query the client sent, with all shell-special characters escaped with - <c>\\</c>.</p> + <c>\</c>.</p> </item> <tag><c>DATE_LOCAL</c></tag> <item> @@ -753,24 +764,28 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ schema and the tables already is created. </p> <code> - -module(mnesia_test). - -export([start/0,load_data/0]). - -include("mod_auth.hrl"). - - first_start()-> - mnesia:create_schema([node()]), - mnesia:start(), - mnesia:create_table(httpd_user, - [{type,bag},{disc_copies,[node()]}, - {attributes,record_info(fields,httpd_user)}]), - mnesia:create_table(httpd_group, - [{type,bag},{disc_copies,[node()]}, - {attributes,record_info(fields,httpd_group)}]), - mnesia:wait_for_tables([httpd_user,httpd_group],60000). - - start()-> - mnesia:start(), - mnesia:wait_for_tables([httpd_user,httpd_group],60000). +-module(mnesia_test). +-export([start/0,load_data/0]). +-include("mod_auth.hrl"). + +first_start() -> + mnesia:create_schema([node()]), + mnesia:start(), + mnesia:create_table(httpd_user, + [{type, bag}, + {disc_copies, [node()]}, + {attributes, record_info(fields, + httpd_user)}]), + mnesia:create_table(httpd_group, + [{type, bag}, + {disc_copies, [node()]}, + {attributes, record_info(fields, + httpd_group)}]), + mnesia:wait_for_tables([httpd_user, httpd_group], 60000). + +start() -> + mnesia:start(), + mnesia:wait_for_tables([httpd_user, httpd_group], 60000). </code> <p>To create the Mnesia tables we use two records defined in diff --git a/lib/inets/doc/src/http.xml b/lib/inets/doc/src/httpc.xml index f6f8338113..7430a62b1b 100644 --- a/lib/inets/doc/src/http.xml +++ b/lib/inets/doc/src/httpc.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,26 +13,26 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> - <title>http</title> + <title>httpc</title> <prepared>Ingela Anderton Andin</prepared> <responsible></responsible> <docno></docno> <date></date> <rev></rev> </header> - <module>http</module> + <module>httpc</module> <modulesummary>An HTTP/1.1 client </modulesummary> <description> - <p>This module provides the API to a HTTP/1.1 client according to - RFC 2616, caching is currently not supported.</p> + <p>This module provides the API to a HTTP/1.1 compatible client according + to RFC 2616, caching is currently not supported.</p> <note> <p>When starting the Inets application a manager process for the default profile will be started. The functions in this API @@ -64,6 +64,8 @@ request_id() = ref() profile() = atom() path() = string() representing a file path or directory path ip_address() = See inet(3) +socket_opt() = See the Options used by gen_tcp(3) and + ssl(3) connect(s) ]]></code> </section> @@ -130,38 +132,23 @@ ssl_options() = {verify, code()} | <p>The client can be stopped using inets:stop(httpc, Pid) or inets:stop(httpc, Profile).</p> - <marker id="cancel_request"></marker> + <marker id="request1"></marker> </section> <funcs> <func> - <name>cancel_request(RequestId) -> </name> - <name>cancel_request(RequestId, Profile) -> ok</name> - <fsummary>Cancels an asynchronous HTTP-request.</fsummary> - <type> - <v>RequestId = request_id() - A unique identifier as returned - by request/4</v> - <v>Profile = profile()</v> - </type> - <desc> - <p>Cancels an asynchronous HTTP-request. </p> - - <marker id="request1"></marker> - </desc> - </func> - - <func> <name>request(Url) -> </name> <name>request(Url, Profile) -> {ok, Result} | {error, Reason}</name> <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>Url = url() </v> + <v>Result = {status_line(), headers(), body()} | + {status_code(), body()} | request_id() </v> <v>Profile = profile()</v> <v>Reason = term() </v> </type> <desc> - <p>Equivalent to http:request(get, {Url, []}, [], []).</p> + <p>Equivalent to httpc:request(get, {Url, []}, [], []).</p> <marker id="request2"></marker> </desc> @@ -177,55 +164,59 @@ ssl_options() = {verify, code()} | <v>Request = request()</v> <v>HTTPOptions = http_options()</v> <v>http_options() = [http_option()]</v> - <v>http_option() = {timeout, timeout()} | + <v>http_option() = {timeout, timeout()} | {connect_timeout, timeout()} | - {ssl, ssl_options()} | - {autoredirect, boolean()} | + {ssl, ssl_options()} | + {autoredirect, boolean()} | {proxy_auth, {userstring(), passwordstring()}} | - {version, http_version()} | - {relaxed, boolean()}</v> + {version, http_version()} | + {relaxed, boolean()}</v> <v>timeout() = integer() >= 0 | infinity</v> <v>Options = options()</v> <v>options() = [option()]</v> - <v>option() = {sync, boolean()} | - {stream, stream_to()} | - {body_format, body_format()} | - {full_result, boolean()} | - {headers_as_is, boolean()}</v> - <v>stream_to() = self | {self, once} | filename() </v> - <v>body_format() = string() | binary() </v> + <v>option() = {sync, boolean()} | + {stream, stream_to()} | + {body_format, body_format()} | + {full_result, boolean()} | + {headers_as_is, boolean() | + {socket_opts, socket_opts()} | + {receiver, receiver()}}</v> + <v>stream_to() = none | self | {self, once} | filename() </v> + <v>socket_opts() = [socket_opt()]</v> + <v>receiver() = pid() | function()/1 | {Module, Function, Args} </v> + <v>Module = atom() </v> + <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>Profile = profile() </v> - <v>Reason = term() </v> + <v>Reason = {connect_failed, term()} | + {send_failed, term()} | term() </v> </type> <desc> <p>Sends a HTTP-request. The function can be both synchronous and asynchronous. In the later case the function will return - {ok, RequestId} and later on message(s) will be sent to the - calling process on the format: </p> -<pre> - {http, {RequestId, Result}} - {http, {RequestId, {error, Reason}}} - {http, {RequestId, stream_start, Headers} - {http, {RequestId, stream, BinBodyPart} - {http, {RequestId, stream_end, Headers} - {http, {RequestId, saved_to_file}}. -</pre> + {ok, RequestId} and later on the information will be delivered + to the <c>receiver</c> depending on that value. </p> <p>Http option (<c>http_option()</c>) details: </p> <taglist> <tag><c><![CDATA[timeout]]></c></tag> <item> <p>Timeout time for the request. </p> + <p>The clock start ticking as soon as the request has been + sent. </p> + <p>Time is in milliseconds. </p> <p>Defaults to <c>infinity</c>. </p> </item> <tag><c><![CDATA[connect_timeout]]></c></tag> <item> <p>Connection timeout time, used during the initial request, - when the client is connecting to the server. </p> + when the client is <em>connecting</em> to the server. </p> + <p>Time is in milliseconds. </p> <p>Defaults to the value of the <c>timeout</c> option. </p> </item> @@ -287,7 +278,7 @@ ssl_options() = {verify, code()} | stream_start, Headers}, {http, {RequestId, stream, BinBodyPart}, {http, {RequestId, stream_end, Headers}. When streaming to to the calling processes using the option - <c>{self once}</c> the first message will have an additional + <c>{self, once}</c> the first message will have an additional element e.i. {http, {RequestId, stream_start, Headers, Pid}, this is the process id that should be used as an argument to http:stream_next/1 to trigger the next message to be sent to @@ -329,8 +320,92 @@ ssl_options() = {verify, code()} | <p>Defaults to <c>false</c>. </p> </item> + <tag><c><![CDATA[socket_opts]]></c></tag> + <item> + <p>Socket options to be used for this and subsequent + request(s). </p> + <p>Overrides any value set by the + <seealso marker="set_options">set_options</seealso> + function. </p> + <p>Note that the validity of the options are <em>not</em> + checked in any way. </p> + <p>Note that this may change the socket behaviour + (see <seealso marker="kernel:inet#setopts">inet:setopts/2</seealso>) + for an already existing, and therefor already connected + request handler. </p> + <p>By defaults the socket options set by the + <seealso marker="#set_options">set_options/1,2</seealso> + function is used when establishing connection. </p> + </item> + + <tag><c><![CDATA[receiver]]></c></tag> + <item> + <p>Defines how the client will deliver the result for a + asynchroneous request (<c>sync</c> has the value + <c>false</c>). </p> + + <taglist> + <tag><c><![CDATA[pid()]]></c></tag> + <item> + <p>Message(s) will be sent to this process in the format: </p> +<pre> +{http, ReplyInfo} +</pre> + </item> + + <tag><c><![CDATA[function/1]]></c></tag> + <item> + <p>Information will be delivered to the receiver via calls + to the provided fun: </p> +<pre> +Receiver(ReplyInfo) +</pre> + </item> + + <tag><c><![CDATA[{Module, Funcion, Args}]]></c></tag> + <item> + <p>Information will be delivered to the receiver via calls + to the callback function: </p> +<pre> +apply(Module, Function, [ReplyInfo | Args]) +</pre> + </item> + + </taglist> + <p>In all cases above, <c>ReplyInfo</c> has the following + structure: </p> + +<pre> +{RequestId, saved_to_file} +{RequestId, {error, Reason}} +{RequestId, Result} +{RequestId, stream_start, Headers} +{RequestId, stream_start, Headers, HandlerPid} +{RequestId, stream, BinBodyPart} +{RequestId, stream_end, Headers} +</pre> + + <p>Defaults to the <c>pid()</c> of the process calling the request + function (<c>self()</c>). </p> + </item> </taglist> + <marker id="cancel_request"></marker> + </desc> + </func> + + <func> + <name>cancel_request(RequestId) -> </name> + <name>cancel_request(RequestId, Profile) -> ok</name> + <fsummary>Cancels an asynchronous HTTP-request.</fsummary> + <type> + <v>RequestId = request_id() - A unique identifier as returned + by request/4</v> + <v>Profile = profile()</v> + </type> + <desc> + <p>Cancels an asynchronous HTTP-request. </p> + <marker id="set_options"></marker> </desc> </func> @@ -341,17 +416,30 @@ ssl_options() = {verify, code()} | <fsummary>Sets options to be used for subsequent requests.</fsummary> <type> <v>Options = [Option]</v> - <v>Option = {proxy, {Proxy, NoProxy}} | {max_sessions, MaxSessions} | - {max_keep_alive_length, MaxKeepAlive} | {keep_alive_timeout, KeepAliveTimeout} | - {max_pipeline_length, MaxPipeline} | {pipeline_timeout, PipelineTimeout} | - {cookies | CookieMode} | - {ipfamily, IpFamily} | {ip, IpAddress} | {port, Port} | - {verbose, VerboseMode} </v> + <v>Option = {proxy, {Proxy, NoProxy}} | + {max_sessions, MaxSessions} | + {max_keep_alive_length, MaxKeepAlive} | + {keep_alive_timeout, KeepAliveTimeout} | + {max_pipeline_length, MaxPipeline} | + {pipeline_timeout, PipelineTimeout} | + {cookies, CookieMode} | + {ipfamily, IpFamily} | + {ip, IpAddress} | + {port, Port} | + {socket_opts, socket_opts()} | + {verbose, VerboseMode} </v> <v>Proxy = {Hostname, Port}</v> <v>Hostname = string() </v> <d>ex: "localhost" or "foo.bar.se"</d> <v>Port = integer()</v> <d>ex: 8080 </d> + <v>socket_opts() = [socket_opt()]</v> + <d>The options are appended to the socket options used by the + client. </d> + <d>These are the default values when a new request handler + is started (for the initial connect). They are passed directly + to the underlying transport (gen_tcp or ssl) <em>without</em> + verification! </d> <v>NoProxy = [NoProxyDesc]</v> <v>NoProxyDesc = DomainDesc | HostName | IPDesc</v> <v>DomainDesc = "*.Domain"</v> @@ -439,12 +527,13 @@ ssl_options() = {verify, code()} | same behavior as active once for sockets.</p> <marker id="verify_cookie"></marker> + <marker id="store_cookie"></marker> </desc> </func> <func> - <name>verify_cookie(SetCookieHeaders, Url) -> </name> - <name>verify_cookie(SetCookieHeaders, Url, Profile) -> ok | {error, Reason}</name> + <name>store_cookie(SetCookieHeaders, Url) -> </name> + <name>store_cookie(SetCookieHeaders, Url, Profile) -> ok | {error, Reason}</name> <fsummary>Saves the cookies defined in SetCookieHeaders in the client profile's cookie database.</fsummary> <type> <v>SetCookieHeaders = headers() - where field = "set-cookie"</v> @@ -454,7 +543,7 @@ ssl_options() = {verify, code()} | <desc> <p>Saves the cookies defined in SetCookieHeaders in the client profile's cookie database. You need to - call this function if you set the option cookies to verify. + call this function if you set the option cookies to <c>verify</c>. If no profile is specified the default profile will be used. </p> @@ -476,6 +565,43 @@ ssl_options() = {verify, code()} | when making a request to Url using the profile Profile. If no profile is specified the default profile will be used. </p> + + <marker id="reset_cookies"></marker> + </desc> + </func> + + + <func> + <name>reset_cookies() -> void()</name> + <name>reset_cookies(Profile) -> void()</name> + <fsummary>Reset the cookie database.</fsummary> + <type> + <v>Profile = profile()</v> + </type> + <desc> + <p>Resets (clears) the cookie database for the specified Profile. + If no profile is specified the default profile will be used. + </p> + </desc> + </func> + + + <func> + <name>which_cookies() -> cookies()</name> + <name>which_cookies(Profile) -> cookies()</name> + <fsummary>Dumps out the entire cookie database.</fsummary> + <type> + <v>Profile = profile()</v> + <v>cookies() = [cooie_stores()]</v> + <v>cookie_stores() = {cookies, icookies()} | {session_cookies, icookies()}</v> + <v>icookies() = [icookie()]</v> + <v>cookie() = term()</v> + </type> + <desc> + <p>This function produces a list of the entire cookie database. + It is intended for debugging/testing purposes. + If no profile is specified the default profile will be used. + </p> </desc> </func> </funcs> @@ -483,6 +609,7 @@ ssl_options() = {verify, code()} | <section> <title>SEE ALSO</title> <p>RFC 2616, <seealso marker="inets">inets(3)</seealso>, + <seealso marker="kernel:gen_tcp">gen_tcp(3)</seealso>, <seealso marker="ssl:ssl">ssl(3)</seealso> </p> </section> diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml index 60afcc6cfe..f061488ac3 100644 --- a/lib/inets/doc/src/httpd.xml +++ b/lib/inets/doc/src/httpd.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>2009</year> + <year>1997</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>httpd</title> @@ -93,7 +93,7 @@ followed by the value followed by a new line. Ex: <code> - {server_root, "/urs/local/www"} -> ServerRoot /usr/local/www +{server_root, "/urs/local/www"} -> ServerRoot /usr/local/www </code> <p>With a few exceptions, that are documented @@ -103,9 +103,9 @@ as:</p> <pre> <![CDATA[ - <Directory Dir> - <Properties handled as described above> - </Directory> +<Directory Dir> + <Properties handled as described above> +</Directory> ]]> </pre> </item> @@ -239,9 +239,9 @@ as an Apache like file as well as directly in the property list. Such a file may look like:</p> <pre> - \011 # MIME type\011\011\011Extension - \011 text/html\011\011\011html htm - \011 text/plain\011\011\011asc txt +# MIME type Extension +text/html html htm +text/plain asc txt </pre> <p>Defaults to [{"html","text/html"},{"htm","text/html"}]</p> @@ -869,19 +869,19 @@ bytes ModData = #mod{} -record(mod, { -\011\011data = [], -\011\011socket_type = ip_comm, -\011\011socket, -\011\011config_db, -\011\011method, -\011\011absolute_uri, -\011\011request_uri, -\011\011http_version, -\011\011request_line, -\011\011parsed_header = [], -\011\011entity_body, -\011\011connection -\011 }). + data = [], + socket_type = ip_comm, + socket, + config_db, + method, + absolute_uri, + request_uri, + http_version, + request_line, + parsed_header = [], + entity_body, + connection + }). </code> <p>The fields of the <c>mod</c> record has the following meaning: </p> diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml index 1566ee29d1..6ac2b13c72 100644 --- a/lib/inets/doc/src/httpd_util.xml +++ b/lib/inets/doc/src/httpd_util.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>httpd_util</title> @@ -63,7 +63,7 @@ <v>Etag = string()</v> </type> <desc> - <p><c>create_etag/1</c> calculates the Etag for a file, from it's + <p><c>create_etag/1</c> calculates the Etag for a file, from its size and time for last modification. fileinfo is a record defined in <c>kernel/include/file.hrl</c></p> @@ -78,7 +78,7 @@ <v>HexValue = DecValue = string()</v> </type> <desc> - <p>Converts the hexadecimal value <c>HexValue</c> into it's + <p>Converts the hexadecimal value <c>HexValue</c> into its decimal equivalent (<c>DecValue</c>).</p> <marker id="day"></marker> @@ -218,7 +218,8 @@ <marker id="lookup_mime"></marker> <p><c>lookup_mime</c> returns the mime type associated with a specific file suffix as specified in the <c>mime.types</c> - file (located in the <path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\\\\conf\\\\mime.types">config directory</path>).</p> + file (located in the + <path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\conf\mime.types">config directory</path>).</p> <marker id="lookup_mime_default"></marker> </desc> @@ -239,7 +240,7 @@ <p><c>lookup_mime_default</c> returns the mime type associated with a specific file suffix as specified in the <c>mime.types</c> file (located in the - <path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\\\\conf\\\\mime.types">config directory</path>). + <path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\conf\mime.types">config directory</path>). If no appropriate association can be found the value of DefaultType is returned.</p> diff --git a/lib/inets/doc/src/inets.xml b/lib/inets/doc/src/inets.xml index e5fe32f32f..c367d7fa77 100644 --- a/lib/inets/doc/src/inets.xml +++ b/lib/inets/doc/src/inets.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>2007</year><year>2009</year> + <year>2007</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -40,13 +40,13 @@ <title>COMMON DATA TYPES </title> <p>Type definitions that are used more than once in this module: </p> - <p><c> service() = ftpc | tfptd | httpc | httpd</c></p> + <p><c> service() = ftpc | tftp | httpc | httpd</c></p> <p><c> property() = atom() </c></p> </section> <funcs> <func> <name>services() -> [{Service, Pid}]</name> - <fsummary>Returns a list of currently running services. </fsummary> + <fsummary>Returns a list of currently running services. </fsummary> <type> <v>Service = service()</v> <v>Pid = pid()</v> @@ -97,7 +97,7 @@ <name>start(Type) -> ok | {error, Reason}</name> <fsummary>Starts the Inets application. </fsummary> <type> - <v>Type = permanent | transient | temporary</v> + <v>Type = permanent | transient | temporary</v> </type> <desc> <p>Starts the Inets application. Default type @@ -115,11 +115,9 @@ </func> <func> <name>start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason}</name> - <name>start(Service, ServiceConfig, How) -> {ok, Pid} | - {error, Reason}</name> + <name>start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason}</name> <fsummary>Dynamically starts an inets - service after the inets application has been - started. </fsummary> + service after the inets application has been started. </fsummary> <type> <v>Service = service()</v> <v>ServiceConfig = [{Option, Value}]</v> @@ -129,7 +127,7 @@ </type> <desc> <p>Dynamically starts an inets service after the inets - application has been started.\011</p> + application has been started. </p> <note> <p>Dynamically started services will not be handled by application takeover and failover behavior when inets is @@ -153,9 +151,9 @@ <fsummary>Stops a started service of the inets application or takes down a "stand_alone-service" gracefully.</fsummary> <type> - <v>Service = service() | stand_alone</v> + <v>Service = service() | stand_alone</v> <v>Reference = pid() | term() - service specified reference</v> - <v>Reason = term()</v> + <v>Reason = term()</v> </type> <desc> <p>Stops a started service of the inets application or takes @@ -169,7 +167,7 @@ <section> <title>SEE ALSO</title> <p><seealso marker="ftp">ftp(3)</seealso>, - <seealso marker="http">http(3)</seealso>, + <seealso marker="httpc">httpc(3)</seealso>, <seealso marker="httpd">httpd(3)</seealso>, <seealso marker="tftp">tftp(3)</seealso></p> </section> diff --git a/lib/inets/doc/src/make.dep b/lib/inets/doc/src/make.dep index d96c6dc5b8..8deb7e7a5a 100644 --- a/lib/inets/doc/src/make.dep +++ b/lib/inets/doc/src/make.dep @@ -1,3 +1,23 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 1999-2010. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# +# + # ---------------------------------------------------- # >>>> Do not edit this file <<<< # This file was automaticly generated by @@ -9,7 +29,7 @@ # TeX files that the DVI file depend on # ---------------------------------------------------- -book.dvi: book.tex ftp.tex ftp_client.tex http.tex http_client.tex \ +book.dvi: book.tex ftp.tex ftp_client.tex httpc.tex http_client.tex \ http_server.tex httpd.tex httpd_conf.tex httpd_socket.tex \ httpd_util.tex inets.tex inets_services.tex \ mod_alias.tex mod_auth.tex mod_esi.tex mod_security.tex \ diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml index d4541a1d15..6bad77dc0a 100644 --- a/lib/inets/doc/src/mod_esi.xml +++ b/lib/inets/doc/src/mod_esi.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>mod_esi</title> @@ -94,7 +94,7 @@ that the first chunk of data sent to the client must at least contain all HTTP header fields that the response will generate. If the first chunk not contains - <em>End of HTTP header</em> that is <c>"\\r\ \\r\ "</c> + <em>End of HTTP header</em> that is <c>"\r\n\r\n"</c> the server will assume that no HTTP header fields will be generated.</p> </desc> diff --git a/lib/inets/doc/src/mod_security.xml b/lib/inets/doc/src/mod_security.xml index 5f9f88071e..2a871d29d8 100644 --- a/lib/inets/doc/src/mod_security.xml +++ b/lib/inets/doc/src/mod_security.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1998</year><year>2009</year> + <year>1998</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>mod_security</title> @@ -117,11 +117,14 @@ <section> <marker id="callback_module"></marker> <title>The SecurityCallbackModule</title> - <p>The SecurityCallbackModule is a user written module that can receive events from - the mod_security Erlang Webserver API module. This module only exports one function, - <seealso marker="#callback_module_event">event/4</seealso>, which is described below. + <p>The SecurityCallbackModule is a user written module that can receive + events from the mod_security Erlang Webserver API module. + This module only exports the function(s), + <seealso marker="#callback_module_event">event/4,5</seealso>, + which are described below. </p> </section> + <funcs> <func> <name>event(What, Port, Dir, Data) -> ignored</name> @@ -131,7 +134,7 @@ <v>What = atom()</v> <v>Port = integer()</v> <v>Address = {A,B,C,D} | string() <v>Dir = string()</v> - <v>What = [Info]</v> + <v>Data = [Info]</v> <v>Info = {Name, Value}</v> </type> <desc> diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index 489e88cbe5..c954d4b7eb 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> - <year>2002</year><year>2009</year> + <year>2002</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -32,6 +32,426 @@ <file>notes.xml</file> </header> + <section><title>Inets 5.3.6</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>[httpd] XSS prevention did not work for hex-encoded URL's. </p> + <p>Own Id: OTP-9655</p> + </item> + + <item> + <p>[httpd] GET request with malformed header date caused + server crash (non-fatal) with no reply to client. Will + now result in a reply with status code 400. </p> + <p>Own Id: OTP-9674</p> + <p>Aux Id: seq11936</p> + </item> + + </list> + </section> + + </section> <!-- 5.3.6 --> + + + <section><title>Inets 5.3.5</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>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.</p> + <p>Own Id: OTP-8940</p> + <p>Aux Id: seq11735</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 + characters. </p> + <p>Michael Santos</p> + <p>Own Id: OTP-9124</p> + </item> + </list> + </section> + + </section> <!-- 5.3.5 --> + + + <section><title>Inets 5.3.4</title> + + <section><title>Improvements and New Features</title> + <p>-</p> + +<!-- + <list> + <item> + <p>[httpc] - Allow users to pass socket options to the transport + module when making requests. </p> + <p>See the <c>socket_opts</c> option in the + <seealso marker="httpc#request2">request/4</seealso> or + <seealso marker="httpc#set_options">set_options/1,2</seealso> + for more info, </p> + <p>Own Id: OTP-8352</p> + </item> + + </list> +--> + </section> + + <section><title>Fixed Bugs and Malfunctions</title> + +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[httpc] - If a request times out (not during connect), the + handler process exited (normal) but neglected to inform + the manager process. For this reason, the manager + did not clean up the request table, resulting in a + memory leak. Also the manager did not create a monitor + for the handler, so in an unforseen handler crash, this + could also create a memory leak. </p> + <p>Own Id: OTP-8739</p> + </item> + + <item> + <p>[tftp] - Was spelled wrong in documentation and in some + parts of the code. It should be tftp. </p> + <p>Own Id: OTP-8741</p> + </item> + + <item> + <p>[htpc] - Replaced the old http client api module (http) + with the new, http client in the + <seealso marker="http_client">Users Guide</seealso>. </p> + <p>Own Id: OTP-8742</p> + <p>Ryan Zezeski</p> + </item> + + </list> + </section> + + </section> <!-- 5.3.4 --> + + + <section><title>Inets 5.3.3</title> + + <section><title>Improvements and New Features</title> + <p>-</p> + +<!-- + <list> + <item> + <p>[httpc] - Allow users to pass socket options to the transport + module when making requests. </p> + <p>See the <c>socket_opts</c> option in the + <seealso marker="httpc#request2">request/4</seealso> or + <seealso marker="httpc#set_options">set_options/1,2</seealso> + for more info, </p> + <p>Own Id: OTP-8352</p> + </item> + + </list> +--> + </section> + + <section><title>Fixed Bugs and Malfunctions</title> + +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[httpc] - Made cookie handling more case insensitive.</p> + <p>Own Id: OTP-8609</p> + <p>Nicolas Thauvin</p> + </item> + + <item> + <p>[httpc|httpd] - Netscape cookie dates can also be given with a + 2-digit year (e.g. 06 = 2006). </p> + <p>Own Id: OTP-8610</p> + <p>Nicolas Thauvin</p> + </item> + + <item> + <p>[httpd] - Added support (again) for the documented debugging + features. See the User's Guide + <seealso marker="http_server#config">Configuration</seealso> + chapter for more info. </p> + <p>Own Id: OTP-8624</p> + </item> + + </list> + </section> + + </section> <!-- 5.3.3 --> + + + <section><title>Inets 5.3.2</title> + + <section><title>Improvements and New Features</title> + <p>-</p> + +<!-- + <list> + <item> + <p>[httpc] - Allow users to pass socket options to the transport + module when making requests. </p> + <p>See the <c>socket_opts</c> option in the + <seealso marker="httpc#request2">request/4</seealso> or + <seealso marker="httpc#set_options">set_options/1,2</seealso> + for more info, </p> + <p>Own Id: OTP-8352</p> + </item> + + </list> +--> + </section> + + <section><title>Fixed Bugs and Malfunctions</title> + +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[httpc] - Memory leak plugged. + The profile manager never cleaned up in its handler database. + This meant that with each new request handler, another entry + was created that was never deleted. Eventually the request + id counter (used as a key) would wrap, but the machine would + most likely run out of memory before that happened.</p> + <p>Own Id: OTP-8542</p> + <p>Lev Walkin</p> + </item> + + <item> + <p>[httpc] - https requests with default port (443) not handled + properly. </p> + <p>Own Id: OTP-8607</p> + <p>jebu ittiachen</p> + </item> + + </list> + </section> + + </section> <!-- 5.3.2 --> + + + <section><title>Inets 5.3.1</title> + + <section><title>Improvements and New Features</title> + <p>-</p> + +<!-- + <list> + <item> + <p>[httpc] - Allow users to pass socket options to the transport + module when making requests. </p> + <p>See the <c>socket_opts</c> option in the + <seealso marker="httpc#request2">request/4</seealso> or + <seealso marker="httpc#set_options">set_options/1,2</seealso> + for more info, </p> + <p>Own Id: OTP-8352</p> + </item> + + </list> +--> + </section> + + <section><title>Fixed Bugs and Malfunctions</title> + +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[httpc] - Badly formated error reason for errors occuring + during initial connect to a server. + Also, the possible error reasons was + not properly documented.</p> + <p>Own Id: OTP-8508</p> + <p>Aux Id: seq11407</p> + </item> + + <item> + <p>[httpd] - Issues with ESI erl_script_timeout. </p> + <p> + <list type="bulleted"> + <item> + <p>The <c>erl_script_timeout</c> config option is ducumented + as a number of seconds. But when parsing the config, in the + new format (not a config file), it was handled as if in + number of milliseconds. </p> + </item> + <item> + <p>When the erl-script-timeout time was exceeded, the server + incorrectly marked the answer as sent, thereby leaving + client hanging (with an incomplete answer). + This has been changed, so that now the socket will be + closed. </p> + </item> + </list> + </p> + <p>Own Id: OTP-8509</p> + </item> + </list> + </section> + + </section> <!-- 5.3.1 --> + + + <section><title>Inets 5.3</title> + + <section><title>Improvements and New Features</title> +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[httpc] - Allow users to pass socket options to the transport + module when making requests. </p> + <p>See the <c>socket_opts</c> option in the + <seealso marker="httpc#request2">request/4</seealso> or + <seealso marker="httpc#set_options">set_options/1,2</seealso> + for more info, </p> + <p>Own Id: OTP-8352</p> + </item> + + <item> + <p>[httpc] Fix bug crafting Host header when port is not 80. </p> + <p>The host header should include the port number as well as the + host name when making a request to a server listening on a port + other than the HTTP default of 80. Currently, only the host + name is included. This is important to make the http client + more compliant with the HTTP specification. </p> + <p>Own Id: OTP-8371</p> + <p>Kelly McLaughlin</p> + </item> + + <item> + <p>[httpc|httpd] http_chunk data handling/passing improvement. </p> + <p>This is a modification to the http_chunk module to forward any + full chunk received, regardless of whether the size field for the + following chunk has been received yet. This allows http_chunk to + be used in situations where a long term HTTP connection is used to + send periodic status updates as individual chunks. Previously a + given chunk would not be forwarded to the client process until the + size for the next chunk had been read which rendered the module + difficult to use for the scenario described. </p> + <p>Bernard Duggan</p> + <p>Own Id: OTP-8351</p> + </item> + + <item> + <p>Include the inets test suite in the release of the + application. </p> + <p>Own Id: OTP-8349</p> + </item> + + <item> + <p>[httpc] - It is now possible to configure the client to + deliver an async reply to more receivers then the calling + process. </p> + <p>See the + <seealso marker="httpc#request2">receiver</seealso> + option for more info, </p> + <p>Own Id: OTP-8106</p> + </item> + + <item> + <p>[httpd] - Methods "PUT" and "DELETE" now allowed. </p> + <p>[email protected]</p> + <p>Own Id: OTP-8103</p> + </item> + + <item> + <p>[httpc] Several more or less critical fixes:</p> + <p> + <list type="bulleted"> + <item> + <p>Initial call between the httpc manager and request + handler was synchronous. </p> + <p>When the manager starts a new request handler, + this is no longer a synchronous operation. Previously, + the new request handler made the connection to the + server and issuing of the first request (the reason + for starting it) in the gen_server init function. + If the connection for some reason "took some time", + the manager hanged, leaving all other activities by + that manager also hanging. </p> + </item> +<!-- + <item> + <p>Copying of data between processes</p> + <p>TBD</p> + </item> + <item> + <p>Reading of requests</p> + <p>TBD</p> + </item> +--> + </list> + </p> + <p>As a side-effect of these changes, some modules was also + renamed, and a new api module, + <seealso marker="httpc">httpc</seealso>, has been introduced + (the old module <c>http</c> is <em>not</em> removed, but is + now just wrapper for <c>httpc</c>). </p> + <p>Own Id: OTP-8016</p> + <p>*** POTENTIAL INCOMPATIBILITY ***</p> + </item> + </list> + </section> + + <section><title>Fixed Bugs and Malfunctions</title> + +<!-- + <p>-</p> +--> + + <list> + <item> + <p>[httpd] The server did not fully support the documented module + callback api. Specifically, the load function should be able to + return the atom <c>ok</c>, but this was not accepted. </p> + <p>Own Id: OTP-8359</p> + </item> + + <item> + <p>Fixing various documentation-related bugs (bad quotes).</p> + <p>Own Id: OTP-8327</p> + </item> + + <item> + <p>Fixing minor Dialyzer and copyright problem(s). </p> + <p>Own Id: OTP-8315</p> + </item> + + <item> + <p>[httpc] - Added basic sanity check of option value + combinations.</p> + <p>[email protected]</p> + <p>Own Id: OTP-8056</p> + </item> + </list> + </section> + + </section> <!-- 5.3 --> + + <section><title>Inets 5.2</title> <section><title>Improvements and New Features</title> @@ -139,7 +559,7 @@ <p>Timeout out requests are retried. </p> </item> </list> - <p>Jean-S�bastien P�dron</p> + <p>Jean-Sébastien Pédron</p> <p>Own Id: OTP-8248</p> </item> @@ -214,7 +634,7 @@ request, when the client connects to the server. Default value is that of the <c>timeout</c> option. </p> <p>See the - <seealso marker="http#request2">request/4,5</seealso> + <seealso marker="httpc#request2">request/4,5</seealso> function for more info. </p> <p>Own Id: OTP-7298</p> <!-- <p>Aux Id: seq11086</p> --> @@ -321,7 +741,7 @@ the client connects to the server. </p> <p>As a side-effect of this, the option <c>ipv6</c> has been removed and replaced by the <c>ipfamily</c> option. </p> - <p>See <seealso marker="http#set_options">http:set_options/1,2</seealso> + <p>See <seealso marker="httpc#set_options">http:set_options/1,2</seealso> for more info. </p> <p>*** POTENTIAL INCOMPATIBILITY ***</p> <p>Own Id: OTP-8004</p> diff --git a/lib/inets/doc/src/notes_history.xml b/lib/inets/doc/src/notes_history.xml index 53375c9aa7..6480bad758 100644 --- a/lib/inets/doc/src/notes_history.xml +++ b/lib/inets/doc/src/notes_history.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>Inets Release Notes History</title> @@ -385,8 +385,7 @@ </item> <item> <p>[httpc, httpd] - In some cases if a body contained the - sequence "\\r\ - 0" and was chunked encoded this sequence + sequence "\r\n0" and was chunked encoded this sequence was incorrectly interpreted as the last chunk.</p> <p>Own Id: OTP-6264 Aux Id: OTP-6005 </p> </item> @@ -968,8 +967,7 @@ design was changed to use gen_tcp active once semantics. The API is not effected except for the function ftp:quote/2 which now returns a list of strings (ftp - result lines) where the line endings "\\r\ - " has been + result lines) where the line endings "\r\n" has been removed. This was the original intention for the return value of ftp:quote/2 but it was non trivial to make a good such solution with the old design and a compromise @@ -1055,13 +1053,11 @@ <p>Own Id: OTP-5551 Aux Id: seq9854 </p> </item> <item> - <p>The HTTP server now handles "GET /\\r\ - \\r\ - " as well as - "GET / \\r\ - \\r\ - ". According to the RFC the whitespace is - not needed.</p> + <p>The HTTP server now handles + "GET /\r\n\r\n" + as well as + "GET / \r\n\r\n". + According to the RFC the whitespace is not needed.</p> <p>Own Id: OTP-5552 Aux Id: seq8426 </p> </item> </list> diff --git a/lib/inets/doc/src/ref_man.xml b/lib/inets/doc/src/ref_man.xml index 7ec2c041c8..45d5dfcd0e 100644 --- a/lib/inets/doc/src/ref_man.xml +++ b/lib/inets/doc/src/ref_man.xml @@ -4,7 +4,7 @@ <application xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>Inets Reference Manual</title> @@ -36,7 +36,7 @@ <xi:include href="inets.xml"/> <xi:include href="ftp.xml"/> <xi:include href="tftp.xml"/> - <xi:include href="http.xml"/> + <xi:include href="httpc.xml"/> <xi:include href="httpd.xml"/> <xi:include href="httpd_conf.xml"/> <xi:include href="httpd_socket.xml"/> |