From 6153ba7599f2ce1ab22959a40b6ca33b4238f0d0 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 13 Jan 2010 16:18:24 +0000 Subject: OTP-8016, OTP-8056, OTP-8103, OTP-8106, OTP-8312, OTP-8315, OTP-8327, OTP-8349, OTP-8351, OTP-8359 & OTP-8371. --- lib/inets/doc/src/Makefile | 58 ++-- lib/inets/doc/src/ftp.xml | 16 +- lib/inets/doc/src/http.xml | 491 ------------------------------ lib/inets/doc/src/http_server.xml | 86 +++--- lib/inets/doc/src/httpc.xml | 581 ++++++++++++++++++++++++++++++++++++ lib/inets/doc/src/httpd.xml | 46 +-- lib/inets/doc/src/httpd_util.xml | 11 +- lib/inets/doc/src/inets.xml | 8 +- lib/inets/doc/src/make.dep | 22 +- lib/inets/doc/src/mod_esi.xml | 8 +- lib/inets/doc/src/notes.xml | 120 +++++++- lib/inets/doc/src/notes_history.xml | 24 +- lib/inets/doc/src/ref_man.xml | 8 +- 13 files changed, 838 insertions(+), 641 deletions(-) delete mode 100644 lib/inets/doc/src/http.xml create mode 100644 lib/inets/doc/src/httpc.xml (limited to 'lib/inets/doc/src') 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 @@
- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -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. - + ftp @@ -534,12 +534,14 @@ Start an standalone ftp client. Host = string() | ip_address() - Opts = start_options() | open_options() - start_options() = [start_option()] + Opts = options() + options() = [option()] + option() = start_option() | open_option() + start_option() = {verbose, verbose()} | {debug, debug()} verbose() = boolean() (defaults to false) debug() = disable | debug | trace (defaults to disable) - open_options() = [open_option()] + open_option() = {ipfamily, ipfamily()} | {port, port()} | {mode, mode()} | {timeout, timeout()} | {progress, progress()} ipfamily() = inet | inet6 | inet6fb4 (defaults to inet) port() = integer() > 0 (defaults to 21) @@ -845,7 +847,7 @@ Pid = pid() Command = string() - FTPLine = string() - Note the telnet end of line characters, from the ftp protocol definition, CRLF e.g. "\\r\ " has been removed. + FTPLine = string() - Note the telnet end of line characters, from the ftp protocol definition, CRLF e.g. "\\r\\n" has been removed.

Sends an arbitrary FTP command and returns verbatimly a list diff --git a/lib/inets/doc/src/http.xml b/lib/inets/doc/src/http.xml deleted file mode 100644 index f6f8338113..0000000000 --- a/lib/inets/doc/src/http.xml +++ /dev/null @@ -1,491 +0,0 @@ - - - - -

- - 20042009 - Ericsson AB. 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. - - - - http - Ingela Anderton Andin - - - - -
- http - An HTTP/1.1 client - -

This module provides the API to a HTTP/1.1 client according to - RFC 2616, caching is currently not supported.

- -

When starting the Inets application a manager process for the - default profile will be started. The functions in this API - that does not explicitly use a profile will accesses the - default profile. A profile keeps track of proxy options, - cookies and other options that can be applied to more than one - request.

- -

If the scheme - https is used the ssl application needs to be started.

- -

Also note that pipelining will only be used if the pipeline - timeout is set, otherwise persistent connections without - pipelining will be used e.i. the client always waits for - the previous response before sending the next request.

-
-

There are some usage examples in the Inets User's Guide.

-
- -
- COMMON DATA TYPES -

Type definitions that are used more than once in - this module:

- - -
- -
- HTTP DATA TYPES -

Type definitions that are related to HTTP:

-

For more information about HTTP see rfc 2616

- - - -
- -
- SSL DATA TYPES -

Some type definitions relevant when using https, - for details ssl(3):

- -
- -
- HTTP CLIENT SERVICE START/STOP - -

A HTTP client can be configured to start when starting the inets - application or started dynamically in runtime by calling the - inets application API inets:start(httpc, ServiceConfig), or - inets:start(httpc, ServiceConfig, How) - see inets(3) Below follows a - description of the available configuration options.

- - {profile, profile()} - Name of the profile, see - common data types below, this option is mandatory. - {data_dir, path()} - Directory where the profile - may save persistent data, if omitted all cookies will be treated - as session cookies. - - -

The client can be stopped using inets:stop(httpc, Pid) or - inets:stop(httpc, Profile).

- - -
- - - - cancel_request(RequestId) -> - cancel_request(RequestId, Profile) -> ok - Cancels an asynchronous HTTP-request. - - RequestId = request_id() - A unique identifier as returned - by request/4 - Profile = profile() - - -

Cancels an asynchronous HTTP-request.

- - -
-
- - - request(Url) -> - request(Url, Profile) -> {ok, Result} | {error, Reason} - Sends a get HTTP-request - - Url = url() Result = {status_line(), headers(), - body()} | {status_code(), body()} | request_id() - Profile = profile() - Reason = term() - - -

Equivalent to http:request(get, {Url, []}, [], []).

- - -
-
- - - request(Method, Request, HTTPOptions, Options) -> - request(Method, Request, HTTPOptions, Options, Profile) -> {ok, Result} | {ok, saved_to_file} | {error, Reason} - - Sends a HTTP-request - - Method = method() - Request = request() - HTTPOptions = http_options() - http_options() = [http_option()] - http_option() = {timeout, timeout()} | - {connect_timeout, timeout()} | - {ssl, ssl_options()} | - {autoredirect, boolean()} | - {proxy_auth, {userstring(), passwordstring()}} | - {version, http_version()} | - {relaxed, boolean()} - timeout() = integer() >= 0 | infinity - Options = options() - options() = [option()] - option() = {sync, boolean()} | - {stream, stream_to()} | - {body_format, body_format()} | - {full_result, boolean()} | - {headers_as_is, boolean()} - stream_to() = self | {self, once} | filename() - body_format() = string() | binary() - Result = {status_line(), headers(), body()} | - {status_code(), body()} | request_id() - Profile = profile() - Reason = term() - - - -

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:

-
-          {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}}.
-
- -

Http option (http_option()) details:

- - - -

Timeout time for the request.

-

Defaults to infinity.

-
- - - -

Connection timeout time, used during the initial request, - when the client is connecting to the server.

-

Defaults to the value of the timeout option.

-
- - - -

If using SSL, these SSL-specific options are used.

-

Defaults to [].

-
- - - -

Should the client automatically retreive the information - from the new URI and return that as the result instead - of a 30X-result code.

-

Note that for some 30X-result codes automatic redirect - is not allowed in these cases the 30X-result will always - be returned.

-

Defaults to true.

-
- - - -

A proxy-authorization header using the provided user name and - password will be added to the request.

-
- - - -

Can be used to make the client act as an HTTP/1.0 or - HTTP/0.9 client. By default this is an HTTP/1.1 - client. When using HTTP/1.0 persistent connections will - not be used.

-

Defaults to the trsing "HTTP/1.1".

-
- - - -

If set to true workarounds for known server deviations from - the HTTP-standard are enabled.

-

Defaults to false.

-
- -
- -

Option (option()) details:

- - - -

Shall the request be synchronous or asynchronous.

-

Defaults to true.

-
- - - -

Streams the body of a 200 or 206 response to the calling - process or to a file. When streaming to the calling process - using the option self the the following stream messages - will be sent to that process: {http, {RequestId, - stream_start, Headers}, {http, {RequestId, stream, - BinBodyPart}, {http, {RequestId, stream_end, Headers}. When - streaming to to the calling processes using the option - {self once} 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 - the calling process.

-

Note that it is possible that chunked encoding will add - headers so that there are more headers in the stream_end - message than in the stream_start. - When streaming to a file and the request is asynchronous the - message {http, {RequestId, saved_to_file}} will be sent.

-

Defaults to none.

-
- - - -

Defines if the body shall be delivered as a string or as a - binary. This option is only valid for the synchronous - request.

-

Defaults to string.

-
- - - -

Should a "full result" be returned to the caller (that is, - the body, the headers and the entire status-line) or not - (the body and the status code).

-

Defaults to true.

-
- - - -

Shall the headers provided by the user be made - lower case or be regarded as case sensitive.

-

Note that the http standard requires them to be - case insenstive. This feature should only be used if there is - no other way to communicate with the server or for testing - purpose. Also note that when this option is used no headers - will be automatically added, all necessary headers has to be - provided by the user.

-

Defaults to false.

-
- -
- - -
-
- - - set_options(Options) -> - set_options(Options, Profile) -> ok | {error, Reason} - Sets options to be used for subsequent requests. - - Options = [Option] - 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} - Proxy = {Hostname, Port} - Hostname = string() - ex: "localhost" or "foo.bar.se" - Port = integer() - ex: 8080 - NoProxy = [NoProxyDesc] - NoProxyDesc = DomainDesc | HostName | IPDesc - DomainDesc = "*.Domain" - ex: "*.ericsson.se" - IpDesc = string() - ex: "134.138" or "[FEDC:BA98" (all IP-addresses starting with 134.138 or FEDC:BA98), "66.35.250.150" or "[2010:836B:4179::836B:4179]" (a complete IP-address). - MaxSessions = integer() - Default is 2. - Maximum number of persistent connections to a host. - MaxKeepAlive = integer() - Default is 5. - Maximum number of outstanding requests on the same connection to - a host. - KeepAliveTimeout = integer() - Default is 120000 (= 2 min). - If a persistent connection is idle longer than the - keep_alive_timeout the client will close the connection. - The server may also have a such a time out but you should - not count on it! - MaxPipeline = integer() - Default is 2. - Maximum number of outstanding requests on a pipelined connection to a host. - PipelineTimeout = integer() - Default is 0, - which will result in pipelining not being used. - If a persistent connection is idle longer than the - pipeline_timeout the client will close the connection. - CookieMode = enabled | disabled | verify - Default is disabled. - If Cookies are enabled all valid cookies will automatically be - saved in the client manager's cookie database. - If the option verify is used the function http:verify_cookie/2 - has to be called for the cookie to be saved. - IpFamily = inet | inet6 | inet6fb4 - By default inet. - When it is set to inet6fb4 you can use both ipv4 and ipv6. - It first tries inet6 and if that does not works falls back to inet. - The option is here to provide a workaround for buggy ipv6 stacks to ensure that - ipv4 will always work. - IpAddress = ip_address() - If the host has several network interfaces, this option specifies which one to use. - See gen_tcp:connect/3,4 for more info. - Port = integer() - Specify which local port number to use. - See gen_tcp:connect/3,4 for more info. - VerboseMode = false | verbose | debug | trace - Default is false. - This option is used to switch on (or off) - different levels of erlang trace on the client. - It is a debug feature. - Profile = profile() - - -

Sets options to be used for subsequent - requests.

- -

If possible the client will keep its connections - alive and use persistent connections - with or without pipeline depending on configuration - and current circumstances. The HTTP/1.1 specification does not - provide a guideline for how many requests that would be - ideal to be sent on a persistent connection, - this very much depends on the - application. Note that a very long queue of requests may cause a - user perceived delays as earlier request may take a long time - to complete. The HTTP/1.1 specification does suggest a - limit of 2 persistent connections per server, which is the - default value of the max_sessions option.

-
- - -
-
- - - stream_next(Pid) -> ok - Triggers the next message to be streamed, e.i. - same behavior as active once for sockets. - - - Pid = pid() - as received in the stream_start message - - -

Triggers the next message to be streamed, e.i. - same behavior as active once for sockets.

- - -
-
- - - verify_cookie(SetCookieHeaders, Url) -> - verify_cookie(SetCookieHeaders, Url, Profile) -> ok | {error, Reason} - Saves the cookies defined in SetCookieHeaders in the client profile's cookie database. - - SetCookieHeaders = headers() - where field = "set-cookie" - Url = url() - Profile = profile() - - -

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. - If no profile is specified the default profile will be used. -

- - -
-
- - - cookie_header(Url) -> - cookie_header(Url, Profile) -> header() | {error, Rason} - Returns the cookie header that would be sent when - making a request to Url using the profile Profile. - - Url = url() - Profile = profile() - - -

Returns the cookie header that would be sent - when making a request to Url using the profile Profile. - If no profile is specified the default profile will be used. -

-
-
-
- -
- SEE ALSO -

RFC 2616, inets(3), - ssl(3) -

-
- - - diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index 56317d647c..547617e2e3 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -4,7 +4,7 @@
- 20042009 + 20042010 Ericsson AB. All Rights Reserved. @@ -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. - + HTTP server @@ -82,7 +82,7 @@

The server is configured using an erlang property list. For the available properties see - httpd(3) + httpd(3) For backwards compatibility also apache-like config files are supported.

@@ -246,7 +246,7 @@ every row contains the name of the group and the members of the group separated by a space, for example:

-\011    GroupName: Member1 Member2 .... MemberN
+GroupName: Member1 Member2 .... MemberN
             
@@ -278,8 +278,8 @@ and every row contains User Name and Password separated by a colon, for example:

-\011    UserName:Password
-\011    UserName:Password
+UserName:Password
+UserName:Password
             
@@ -299,11 +299,11 @@ the specified methods. If no request method is specified all request methods are verified against the restrictions.

-\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>
             
@@ -363,12 +363,10 @@ message-body, separated by a blank line. The message-header contains one or more header fields. The body may be empty. Example:

- -"Content-Type:text/plain\ -Accept-Ranges:none\ -\ -some very -\011plain text" + + "Content-Type:text/plain\nAccept-Ranges:none\n\nsome very + plain text" +

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.

@@ -387,7 +385,7 @@ some very the extra overhead. An URL which calls an Erlang erl function has the following syntax (regular expression):

-\011 http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo) +http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo)

*** above depends on how the ErlScriptAlias config directive has been used

@@ -428,7 +426,7 @@ http://your.server.org/***/Mod:Func(Arg1,...,ArgN) http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[])))

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.

Today there are no good way of solving this problem and therefore Eval Scheme may be removed in future @@ -498,14 +496,14 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ for parsed files, for example:

-\011text/x-server-parsed-html shtml shtm
+	text/x-server-parsed-html shtml shtm
         

This makes files ending with .shtml and .shtm into parsed files. Alternatively, if the performance hit is not a problem, all HTML pages can be marked as parsed:

-\011text/x-server-parsed-html html htm
+	text/x-server-parsed-html html htm
         
@@ -518,7 +516,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ unparsed. Each directive has the following format:

-\011<!--#command tag1="value1" tag2="value2" -->
+	<!--#command tag1="value1" tag2="value2" -->
         

Each command takes different arguments, most only accept one tag at a time. Here is a breakdown of the commands and their @@ -612,7 +610,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[

The unescaped version of any search query the client sent, with all shell-special characters escaped with - \\.

+ \.

DATE_LOCAL @@ -753,24 +751,28 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ schema and the tables already is created.

- -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).

To create the Mnesia tables we use two records defined in diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml new file mode 100644 index 0000000000..680473cc38 --- /dev/null +++ b/lib/inets/doc/src/httpc.xml @@ -0,0 +1,581 @@ + + + + +

+ + 20042010 + Ericsson AB. 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. + + + + http + Ingela Anderton Andin + + + + +
+ httpc + An HTTP/1.1 client + +

This module provides the API to a HTTP/1.1 compatible client according + to RFC 2616, caching is currently not supported.

+ +

When starting the Inets application a manager process for the + default profile will be started. The functions in this API + that does not explicitly use a profile will accesses the + default profile. A profile keeps track of proxy options, + cookies and other options that can be applied to more than one + request.

+ +

If the scheme + https is used the ssl application needs to be started.

+ +

Also note that pipelining will only be used if the pipeline + timeout is set, otherwise persistent connections without + pipelining will be used e.i. the client always waits for + the previous response before sending the next request.

+
+

There are some usage examples in the Inets User's Guide.

+
+ +
+ COMMON DATA TYPES +

Type definitions that are used more than once in + this module:

+ + +
+ +
+ HTTP DATA TYPES +

Type definitions that are related to HTTP:

+

For more information about HTTP see rfc 2616

+ + + +
+ +
+ SSL DATA TYPES +

Some type definitions relevant when using https, + for details ssl(3):

+ +
+ +
+ HTTP CLIENT SERVICE START/STOP + +

A HTTP client can be configured to start when starting the inets + application or started dynamically in runtime by calling the + inets application API inets:start(httpc, ServiceConfig), or + inets:start(httpc, ServiceConfig, How) + see inets(3) Below follows a + description of the available configuration options.

+ + {profile, profile()} + Name of the profile, see + common data types below, this option is mandatory. + {data_dir, path()} + Directory where the profile + may save persistent data, if omitted all cookies will be treated + as session cookies. + + +

The client can be stopped using inets:stop(httpc, Pid) or + inets:stop(httpc, Profile).

+ + +
+ + + + request(Url) -> + request(Url, Profile) -> {ok, Result} | {error, Reason} + Sends a get HTTP-request + + Url = url() + Result = {status_line(), headers(), body()} | + {status_code(), body()} | request_id() + Profile = profile() + Reason = term() + + +

Equivalent to httpc:request(get, {Url, []}, [], []).

+ + +
+
+ + + request(Method, Request, HTTPOptions, Options) -> + request(Method, Request, HTTPOptions, Options, Profile) -> {ok, Result} | {ok, saved_to_file} | {error, Reason} + + Sends a HTTP-request + + Method = method() + Request = request() + HTTPOptions = http_options() + http_options() = [http_option()] + http_option() = {timeout, timeout()} | + {connect_timeout, timeout()} | + {ssl, ssl_options()} | + {autoredirect, boolean()} | + {proxy_auth, {userstring(), passwordstring()}} | + {version, http_version()} | + {relaxed, boolean()} + timeout() = integer() >= 0 | infinity + Options = options() + options() = [option()] + option() = {sync, boolean()} | + {stream, stream_to()} | + {body_format, body_format()} | + {full_result, boolean()} | + {headers_as_is, boolean() | + {receiver, receiver()}} + stream_to() = none | self | {self, once} | filename() + receiver() = pid() | function()/1 | {Module, Function, Args} + Module = atom() + Function = atom() + Args = list() + body_format() = string | binary + Result = {status_line(), headers(), body()} | + {status_code(), body()} | request_id() + Profile = profile() + Reason = term() + + + +

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 the information will be delivered + to the receiver depending on that value.

+ +

Http option (http_option()) details:

+ + + +

Timeout time for the request.

+

The clock start ticking as soon as the request has been + sent.

+

Time is in milliseconds.

+

Defaults to infinity.

+
+ + + +

Connection timeout time, used during the initial request, + when the client is connecting to the server.

+

Time is in milliseconds.

+

Defaults to the value of the timeout option.

+
+ + + +

If using SSL, these SSL-specific options are used.

+

Defaults to [].

+
+ + + +

Should the client automatically retreive the information + from the new URI and return that as the result instead + of a 30X-result code.

+

Note that for some 30X-result codes automatic redirect + is not allowed in these cases the 30X-result will always + be returned.

+

Defaults to true.

+
+ + + +

A proxy-authorization header using the provided user name and + password will be added to the request.

+
+ + + +

Can be used to make the client act as an HTTP/1.0 or + HTTP/0.9 client. By default this is an HTTP/1.1 + client. When using HTTP/1.0 persistent connections will + not be used.

+

Defaults to the trsing "HTTP/1.1".

+
+ + + +

If set to true workarounds for known server deviations from + the HTTP-standard are enabled.

+

Defaults to false.

+
+ +
+ +

Option (option()) details:

+ + + +

Shall the request be synchronous or asynchronous.

+

Defaults to true.

+
+ + + +

Streams the body of a 200 or 206 response to the calling + process or to a file. When streaming to the calling process + using the option self the the following stream messages + will be sent to that process: {http, {RequestId, + stream_start, Headers}, {http, {RequestId, stream, + BinBodyPart}, {http, {RequestId, stream_end, Headers}. When + streaming to to the calling processes using the option + {self once} 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 + the calling process.

+

Note that it is possible that chunked encoding will add + headers so that there are more headers in the stream_end + message than in the stream_start. + When streaming to a file and the request is asynchronous the + message {http, {RequestId, saved_to_file}} will be sent.

+

Defaults to none.

+
+ + + +

Defines if the body shall be delivered as a string or as a + binary. This option is only valid for the synchronous + request.

+

Defaults to string.

+
+ + + +

Should a "full result" be returned to the caller (that is, + the body, the headers and the entire status-line) or not + (the body and the status code).

+

Defaults to true.

+
+ + + +

Shall the headers provided by the user be made + lower case or be regarded as case sensitive.

+

Note that the http standard requires them to be + case insenstive. This feature should only be used if there is + no other way to communicate with the server or for testing + purpose. Also note that when this option is used no headers + will be automatically added, all necessary headers has to be + provided by the user.

+

Defaults to false.

+
+ + + +

Defines how the client will deliver the result for a + asynchroneous request (sync has the value + false).

+ + + + +

Message(s) will be sent to this process in the format:

+
+{http, ReplyInfo}
+
+
+ + + +

Information will be delivered to the receiver via calls + to the provided fun:

+
+Receiver(ReplyInfo)
+
+
+ + + +

Information will be delivered to the receiver via calls + to the callback function:

+
+apply(Module, Function, [ReplyInfo | Args])
+
+
+ +
+

In all cases above, ReplyInfo has the following + structure:

+ +
+{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}
+
+ +

Defaults to the pid() of the process calling the request + function (self()).

+
+
+ + +
+
+ + + cancel_request(RequestId) -> + cancel_request(RequestId, Profile) -> ok + Cancels an asynchronous HTTP-request. + + RequestId = request_id() - A unique identifier as returned + by request/4 + Profile = profile() + + +

Cancels an asynchronous HTTP-request.

+ + +
+
+ + + set_options(Options) -> + set_options(Options, Profile) -> ok | {error, Reason} + Sets options to be used for subsequent requests. + + Options = [Option] + 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} + Proxy = {Hostname, Port} + Hostname = string() + ex: "localhost" or "foo.bar.se" + Port = integer() + ex: 8080 + NoProxy = [NoProxyDesc] + NoProxyDesc = DomainDesc | HostName | IPDesc + DomainDesc = "*.Domain" + ex: "*.ericsson.se" + IpDesc = string() + ex: "134.138" or "[FEDC:BA98" (all IP-addresses starting with 134.138 or FEDC:BA98), "66.35.250.150" or "[2010:836B:4179::836B:4179]" (a complete IP-address). + MaxSessions = integer() + Default is 2. + Maximum number of persistent connections to a host. + MaxKeepAlive = integer() + Default is 5. + Maximum number of outstanding requests on the same connection to + a host. + KeepAliveTimeout = integer() + Default is 120000 (= 2 min). + If a persistent connection is idle longer than the + keep_alive_timeout the client will close the connection. + The server may also have a such a time out but you should + not count on it! + MaxPipeline = integer() + Default is 2. + Maximum number of outstanding requests on a pipelined connection to a host. + PipelineTimeout = integer() + Default is 0, + which will result in pipelining not being used. + If a persistent connection is idle longer than the + pipeline_timeout the client will close the connection. + CookieMode = enabled | disabled | verify + Default is disabled. + If Cookies are enabled all valid cookies will automatically be + saved in the client manager's cookie database. + If the option verify is used the function http:verify_cookie/2 + has to be called for the cookie to be saved. + IpFamily = inet | inet6 | inet6fb4 + By default inet. + When it is set to inet6fb4 you can use both ipv4 and ipv6. + It first tries inet6 and if that does not works falls back to inet. + The option is here to provide a workaround for buggy ipv6 stacks to ensure that + ipv4 will always work. + IpAddress = ip_address() + If the host has several network interfaces, this option specifies which one to use. + See gen_tcp:connect/3,4 for more info. + Port = integer() + Specify which local port number to use. + See gen_tcp:connect/3,4 for more info. + VerboseMode = false | verbose | debug | trace + Default is false. + This option is used to switch on (or off) + different levels of erlang trace on the client. + It is a debug feature. + Profile = profile() + + +

Sets options to be used for subsequent + requests.

+ +

If possible the client will keep its connections + alive and use persistent connections + with or without pipeline depending on configuration + and current circumstances. The HTTP/1.1 specification does not + provide a guideline for how many requests that would be + ideal to be sent on a persistent connection, + this very much depends on the + application. Note that a very long queue of requests may cause a + user perceived delays as earlier request may take a long time + to complete. The HTTP/1.1 specification does suggest a + limit of 2 persistent connections per server, which is the + default value of the max_sessions option.

+
+ + +
+
+ + + stream_next(Pid) -> ok + Triggers the next message to be streamed, e.i. + same behavior as active once for sockets. + + + Pid = pid() - as received in the stream_start message + + +

Triggers the next message to be streamed, e.i. + same behavior as active once for sockets.

+ + + +
+
+ + + store_cookie(SetCookieHeaders, Url) -> + store_cookie(SetCookieHeaders, Url, Profile) -> ok | {error, Reason} + Saves the cookies defined in SetCookieHeaders in the client profile's cookie database. + + SetCookieHeaders = headers() - where field = "set-cookie" + Url = url() + Profile = profile() + + +

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. + If no profile is specified the default profile will be used. +

+ + +
+
+ + + cookie_header(Url) -> + cookie_header(Url, Profile) -> header() | {error, Rason} + Returns the cookie header that would be sent when + making a request to Url using the profile Profile. + + Url = url() + Profile = profile() + + +

Returns the cookie header that would be sent + when making a request to Url using the profile Profile. + If no profile is specified the default profile will be used. +

+ + +
+
+ + + + reset_cookies() -> void() + reset_cookies(Profile) -> void() + Reset the cookie database. + + Profile = profile() + + +

Resets (clears) the cookie database for the specified Profile. + If no profile is specified the default profile will be used. +

+
+
+ + + + which_cookies() -> cookies() + which_cookies(Profile) -> cookies() + Dumps out the entire cookie database. + + Profile = profile() + cookies() = [cooie_stores()] + cookie_stores() = {cookies, icookies()} | {session_cookies, icookies()} + icookies() = [icookie()] + cookie() = term() + + +

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. +

+
+
+
+ +
+ SEE ALSO +

RFC 2616, inets(3), + ssl(3) +

+
+ + + diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml index 60afcc6cfe..7dabeb33e9 100644 --- a/lib/inets/doc/src/httpd.xml +++ b/lib/inets/doc/src/httpd.xml @@ -4,7 +4,7 @@
- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -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. - + httpd @@ -93,7 +93,7 @@ followed by the value followed by a new line. Ex: - {server_root, "/urs/local/www"} -> ServerRoot /usr/local/www +{server_root, "/urs/local/www"} -> ServerRoot /usr/local/www

With a few exceptions, that are documented @@ -103,9 +103,9 @@ as:

 	  
-	    
-          
+
+  
+
          ]]>
 	
@@ -239,9 +239,9 @@ as an Apache like file as well as directly in the property list. Such a file may look like:

-	  \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
         

Defaults to [{"html","text/html"},{"htm","text/html"}]

@@ -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 + }).

The fields of the mod record has the following meaning:

diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml index 1566ee29d1..642e5213b0 100644 --- a/lib/inets/doc/src/httpd_util.xml +++ b/lib/inets/doc/src/httpd_util.xml @@ -4,7 +4,7 @@
- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -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. - + httpd_util @@ -218,7 +218,8 @@

lookup_mime returns the mime type associated with a specific file suffix as specified in the mime.types - file (located in the config directory).

+ file (located in the + config directory).

@@ -239,7 +240,7 @@

lookup_mime_default returns the mime type associated with a specific file suffix as specified in the mime.types file (located in the - config directory). + config directory). If no appropriate association can be found the value of DefaultType is returned.

diff --git a/lib/inets/doc/src/inets.xml b/lib/inets/doc/src/inets.xml index e5fe32f32f..81dfe7e944 100644 --- a/lib/inets/doc/src/inets.xml +++ b/lib/inets/doc/src/inets.xml @@ -4,7 +4,7 @@
- 20072009 + 20072010 Ericsson AB. All Rights Reserved. @@ -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. - + inets @@ -129,7 +129,7 @@

Dynamically starts an inets service after the inets - application has been started.\011

+ application has been started.

Dynamically started services will not be handled by application takeover and failover behavior when inets is 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 @@

- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -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. - + mod_esi @@ -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 - End of HTTP header that is "\\r\ \\r\ " + End of HTTP header that is "\r\n\r\n" the server will assume that no HTTP header fields will be generated.

diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index 687e127d0b..10c91949b4 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20022009 + 20022010 Ericsson AB. All Rights Reserved. @@ -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. - + Inets Release Notes @@ -32,21 +32,98 @@ notes.xml
-
Inets 5.2.0.1 +
Inets 5.3
Improvements and New Features -

-

+ -

The documentation is now built with open source tools - (xsltproc and fop) that exists on most - platforms. One visible change is that the frames are removed.

-

Own Id: OTP-8249

+

[httpc] Fix bug crafting Host header when port is not 80.

+

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.

+

Own Id: OTP-8371

+

Kelly McLaughlin

-
+ +

[httpc|httpd] http_chunk data handling/passing improvement.

+

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.

+

Bernard Duggan

+

Own Id: OTP-8351

+
+ + +

Include the inets test suite in the release of the + application.

+

Own Id: OTP-8349

+
+ + +

[httpc] - It is now possible to configure the client to + deliver an async reply to more receivers then the calling + process.

+

See the + receiver + option for more info,

+

Own Id: OTP-8106

+
+ + +

[httpd] - Methods "PUT" and "DELETE" now allowed.

+

huntermorris@gmail.com

+

Own Id: OTP-8103

+
+ + +

[httpc] Several more or less critical fixes:

+

+ + +

Initial call between the httpc manager and request + handler was synchronous.

+

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.

+
+ + +

+

As a side-effect of these changes, some modules was also + renamed, and a new api module, + httpc, has been introduced + (the old module http is not removed, but is + now just wrapper for httpc).

+

Own Id: OTP-8016

+

*** POTENTIAL INCOMPATIBILITY ***

+ +
Fixed Bugs and Malfunctions @@ -57,13 +134,32 @@ -

Fixing minor Dialyzer and copyright problem.

+

[httpd] The server did not fully support the documented module + callback api. Spicifically, the load function should be able to + return the atom ok, but this was not accepted.

+

Own Id: OTP-8359

+ +

Fixing various documentation-related bugs (bad quotes).

+

Own Id: OTP-8327

+
+ + +

Fixing minor Dialyzer and copyright problem(s).

+

Own Id: OTP-8315

+
+ + +

[httpc] - Added basic sanity check of option value + combinations.

+

adam.kocoloski@gmail.com

+

Own Id: OTP-8056

+
-
+
Inets 5.2 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 @@
- 20042009 + 20042010 Ericsson AB. All Rights Reserved. @@ -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. - + Inets Release Notes History @@ -385,8 +385,7 @@

[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.

Own Id: OTP-6264 Aux Id: OTP-6005

@@ -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 @@

Own Id: OTP-5551 Aux Id: seq9854

-

The HTTP server now handles "GET /\\r\ - \\r\ - " as well as - "GET / \\r\ - \\r\ - ". According to the RFC the whitespace is - not needed.

+

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.

Own Id: OTP-5552 Aux Id: seq8426

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 @@
- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -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. - + Inets Reference Manual @@ -36,7 +36,7 @@ - + -- cgit v1.2.3