From fc9f2bb3e2ef36d123451650e141ae5038cc00fc Mon Sep 17 00:00:00 2001 From: tmanevik Date: Thu, 4 Jun 2015 14:35:27 +0200 Subject: inets: Remove documentation of legacy API --- lib/inets/doc/src/Makefile | 1 - lib/inets/doc/src/httpd_conf.xml | 163 --------------------------------------- lib/inets/doc/src/ref_man.xml | 1 - 3 files changed, 165 deletions(-) delete mode 100644 lib/inets/doc/src/httpd_conf.xml diff --git a/lib/inets/doc/src/Makefile b/lib/inets/doc/src/Makefile index a0a3472c4a..cb71fbeb9c 100644 --- a/lib/inets/doc/src/Makefile +++ b/lib/inets/doc/src/Makefile @@ -52,7 +52,6 @@ XML_REF3_FILES = \ http_uri.xml\ httpc.xml\ httpd.xml \ - httpd_conf.xml \ httpd_custom_api.xml \ httpd_socket.xml \ httpd_util.xml \ diff --git a/lib/inets/doc/src/httpd_conf.xml b/lib/inets/doc/src/httpd_conf.xml deleted file mode 100644 index 54a5885eb4..0000000000 --- a/lib/inets/doc/src/httpd_conf.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - -
- - 19972013 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - httpd_conf - Joakim Grebenö - - 1997-10-14 - 2.2 - httpd_conf.sgml -
- httpd_conf - Configuration utility functions to be used by the Erlang - Web server API programmer. - -

This module provides the Erlang Webserver API programmer with - utility functions for adding run-time configuration directives.

- - -
- - - - check_enum(EnumString, ValidEnumStrings) -> Result - Check if string is a valid enumeration. - - EnumString = string() - ValidEnumStrings = [string()] - Result = {ok,atom()} | {error,not_valid} - - - -

check_enum/2 checks if EnumString is a valid - enumeration of ValidEnumStrings in which case it is - returned as an atom.

- - -
-
- - - clean(String) -> Stripped - Remove leading and/or trailing white spaces. - - String = Stripped = string() - - - -

clean/1 removes leading and/or trailing white spaces - from String.

- - -
-
- - - custom_clean(String,Before,After) -> Stripped - Remove leading and/or trailing white spaces and custom characters. - - Before = After = regexp() - String = Stripped = string() - - - -

custom_clean/3 removes leading and/or trailing white - spaces and custom characters from String. Before - and After are regular expressions, as defined in - regexp(3), describing the custom characters.

- - -
-
- - - is_directory(FilePath) -> Result - Check if a file path is a directory. - - FilePath = string() - Result = {ok,Directory} | {error,Reason} - Directory = string() - Reason = string() | enoent | eacces | enotdir | FileInfo - FileInfo = File info record - - - -

is_directory/1 checks if FilePath is a - directory in which case it is returned. Please read - file(3) for a description of enoent, - eacces and enotdir. The definition of - the file info record can be found by including file.hrl - from the kernel application, see file(3).

- - -
-
- - - is_file(FilePath) -> Result - Check if a file path is a regular file. - - FilePath = string() - Result = {ok,File} | {error,Reason} - File = string() - Reason = string() | enoent | eacces | enotdir | FileInfo - FileInfo = File info record - - - -

is_file/1 checks if FilePath is a regular - file in which case it is returned. Read file(3) for a - description of enoent, eacces and - enotdir. The definition of the file info record can be - found by including file.hrl from the kernel application, - see file(3).

- - -
-
- - - make_integer(String) -> Result - Return an integer representation of a string. - - String = string() - Result = {ok,integer()} | {error,nomatch} - - - -

make_integer/1 returns an integer representation of - String.

-
-
-
- -
- - SEE ALSO -

httpd(3)

-
- -
- - diff --git a/lib/inets/doc/src/ref_man.xml b/lib/inets/doc/src/ref_man.xml index bcebcc0fd4..ab6b399a74 100644 --- a/lib/inets/doc/src/ref_man.xml +++ b/lib/inets/doc/src/ref_man.xml @@ -39,7 +39,6 @@ - -- cgit v1.2.3 From ed9ad11c9e1a1681cae44c2c2b48bf70ea68ae43 Mon Sep 17 00:00:00 2001 From: tmanevik Date: Thu, 4 Jun 2015 15:55:54 +0200 Subject: inets: sorted functions alphabetically --- lib/inets/doc/src/http_uri.xml | 59 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/lib/inets/doc/src/http_uri.xml b/lib/inets/doc/src/http_uri.xml index 4b59c0c7a2..c71bfbd686 100644 --- a/lib/inets/doc/src/http_uri.xml +++ b/lib/inets/doc/src/http_uri.xml @@ -72,17 +72,32 @@ fragment() = string() - scheme_defaults() -> SchemeDefaults - A list of scheme and their default ports + decode(HexEncodedURI) -> URI + + Decode a hex encoded URI - SchemeDefaults = [{scheme(), default_scheme_port_number()}] - default_scheme_port_number() = pos_integer() + HexEncodedURI = string() - A possibly hex encoded uri + URI = uri() + -

This function provides a list of the scheme and their default - port numbers currently supported (by default) by this utility.

+

Decode a possibly hex encoded URI.

- +
+
+ + encode(URI) -> HexEncodedURI + + Hex encode an URI + + URI = uri() + HexEncodedURI = string() - Hex encoded uri + + + +

Hex encode an URI.

+ +
@@ -124,35 +139,21 @@ fragment() = string() - encode(URI) -> HexEncodedURI - - Hex encode an URI + scheme_defaults() -> SchemeDefaults + A list of scheme and their default ports - URI = uri() - HexEncodedURI = string() - Hex encoded uri + SchemeDefaults = [{scheme(), default_scheme_port_number()}] + default_scheme_port_number() = pos_integer() - -

Hex encode an URI.

+

This function provides a list of the scheme and their default + port numbers currently supported (by default) by this utility.

- +
- - decode(HexEncodedURI) -> URI - - Decode a hex encoded URI - - HexEncodedURI = string() - A possibly hex encoded uri - URI = uri() - - - -

Decode a possibly hex encoded URI.

- -
-
+
-- cgit v1.2.3 From c54168c72bb42f8ffb0e341fd56cd81a89b53430 Mon Sep 17 00:00:00 2001 From: tmanevik Date: Fri, 3 Jul 2015 09:34:23 +0200 Subject: Inets User Guide Editorial Changes --- lib/inets/doc/src/ftp_client.xml | 53 +-- lib/inets/doc/src/http_client.xml | 96 ++-- lib/inets/doc/src/http_server.xml | 851 ++++++++++++++++++----------------- lib/inets/doc/src/inets_services.xml | 59 +-- lib/inets/doc/src/introduction.xml | 57 +++ lib/inets/doc/src/part.xml | 14 +- 6 files changed, 581 insertions(+), 549 deletions(-) create mode 100644 lib/inets/doc/src/introduction.xml diff --git a/lib/inets/doc/src/ftp_client.xml b/lib/inets/doc/src/ftp_client.xml index 2f5b8abb5f..84fa064551 100644 --- a/lib/inets/doc/src/ftp_client.xml +++ b/lib/inets/doc/src/ftp_client.xml @@ -34,38 +34,27 @@
- Introduction + Getting Started -

Ftp clients are consider to be rather temporary and are - for that reason only started and stopped during - runtime and can not be started at application startup. - Due to the design of FTP client API, letting some - functions return intermediate results, only the process - that started the ftp client will be able to access it in - order to preserve sane semantics. (This could be solved - by changing the API and using the concept of a controlling - process more in line with other OTP applications, but - that is perhaps something for the future.) - If the process that started the ftp session - dies the ftp client process will terminate.

+

FTP clients are considered to be rather temporary. Thus, + they are only started and stopped during runtime and cannot + be started at application startup. + The FTP client API is designed to allow some functions to + return intermediate results. This implies that only the process + that started the FTP client can access it with + preserved sane semantics. (This can be solved + by changing the API, using the concept of a controlling + process as with other OTP applications, but + that is something for future releases of Inets.) + If the process that started the FTP session + dies, the FTP client process terminates.

-

The client supports ipv6 as long as the underlying mechanisms - also do so.

+

The client supports IPv6 as long as the underlying mechanisms + also do so.

-
- -
- Using the FTP Client API -

The following is a simple example of an ftp session, where +

The following is a simple example of an FTP session, where the user guest with password password logs on to - the remote host erlang.org, and where the file - appl.erl is transferred from the remote to the local - host. When the session is opened, the current directory at - the remote host is /home/guest, and /home/fred - at the local host. Before transferring the file, the current - local directory is changed to /home/eproj/examples, and - the remote directory is set to - /home/guest/appl/examples.

+ the remote host erlang.org:

inets:start(). ok @@ -86,6 +75,14 @@ 9> inets:stop(ftpc, Pid). ok ]]> +

The file + appl.erl is transferred from the remote to the local + host. When the session is opened, the current directory at + the remote host is /home/guest, and /home/fred + at the local host. Before transferring the file, the current + local directory is changed to /home/eproj/examples, and + the remote directory is set to + /home/guest/appl/examples.

diff --git a/lib/inets/doc/src/http_client.xml b/lib/inets/doc/src/http_client.xml index 5c42f72cec..f4d7b751ac 100644 --- a/lib/inets/doc/src/http_client.xml +++ b/lib/inets/doc/src/http_client.xml @@ -34,103 +34,91 @@
- Introduction + Configuration -

The HTTP client default profile will be started when the inets +

The HTTP client default profile is started when the Inets application is started and is then available to all processes on - that erlang node. Other profiles may also be started at + that Erlang node. Other profiles can also be started at application startup, or profiles can be started and stopped - dynamically in runtime. Each client profile will spawn a new - process to handle each request unless there is a possibility to use - a persistent connection with or without pipelining. - The client will add a host header and an empty + dynamically in runtime. Each client profile spawns a new + process to handle each request, unless a persistent connection + can be used with or without pipelining. + The client adds a host header and an empty te header if there are no such headers present in the request.

-

The client supports ipv6 as long as the underlying mechanisms also do +

The client supports IPv6 as long as the underlying mechanisms also do so.

-
-
- Configuration -

What to put in the erlang node application configuration file - in order to start a profile at application startup.

+

The following is to be put in the Erlang node application configuration file + to start a profile at application startup:

-      [{inets, [{services, [{httpc, PropertyList}]}]}]
-    
-

For valid properties see + [{inets, [{services, [{httpc, PropertyList}]}]}] +

For valid properties, see httpc(3).

- Using the HTTP Client API + Getting Started +

Start Inets:

1 > inets:start(). - ok - -

The following calls uses the default client profile. - Use the proxy "www-proxy.mycompany.com:8000", - but not for requests to localhost. This will apply to all subsequent - requests

+ ok +

The following calls use the default client profile. + Use the proxy "www-proxy.mycompany.com:8000", + except from requests to localhost. This applies to all the + following requests.

+

Example:

2 > httpc:set_options([{proxy, {{"www-proxy.mycompany.com", 8000}, ["localhost"]}}]). - ok - -

An ordinary synchronous request.

+ ok +

The following is an ordinary synchronous request:

3 > {ok, {{Version, 200, ReasonPhrase}, Headers, Body}} = - httpc:request(get, {"http://www.erlang.org", []}, [], []). - -

With all default values, as above, a get request can also be written - like this.

+ httpc:request(get, {"http://www.erlang.org", []}, [], []). +

With all the default values presented, a get request can also be written + as follows:

4 > {ok, {{Version, 200, ReasonPhrase}, Headers, Body}} = - httpc:request("http://www.erlang.org"). - -

An ordinary asynchronous request. The result will be sent - to the calling process in the form {http, {ReqestId, Result}}

+ httpc:request("http://www.erlang.org"). +

The following is an ordinary asynchronous request:

5 > {ok, RequestId} = - httpc:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]). - -

In this case the calling process is the shell, so we receive the - result.

+ httpc:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]). +

The result is sent to the calling process as + {http, {ReqestId, Result}}.

+

In this case, the calling process is the shell, so the following + result is received:

6 > receive {http, {RequestId, Result}} -> ok after 500 -> error end. - ok - -

Send a request with a specified connection header.

+ ok +

This sends a request with a specified connection header:

7 > {ok, {{NewVersion, 200, NewReasonPhrase}, NewHeaders, NewBody}} = httpc:request(get, {"http://www.erlang.org", [{"connection", "close"}]}, - [], []). - + [], []). -

Start a HTTP client profile.

+

Start an HTTP client profile:

{ok, Pid} = inets:start(httpc, [{profile, foo}]). {ok, <0.45.0>} ]]> -

The new profile has no proxy settings so the connection will - be refused

+

The new profile has no proxy settings, so the connection is refused:

9 > httpc:request("http://www.erlang.org", foo). - {error, econnrefused} - + {error, econnrefused} -

Stop a HTTP client profile.

+

Stop the HTTP client profile:

10 > inets:stop(httpc, foo). - ok - + ok -

Alternatively:

+

Alternative way to stop the HTTP client profile:

10 > inets:stop(httpc, Pid). - ok - + ok
diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index 51ed826c7c..efa5f7a8f5 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -22,7 +22,7 @@ - HTTP server + HTTP server Ingela Anderton Andin @@ -36,62 +36,65 @@
- Introduction - + Configuration +

The HTTP server, also referred to as httpd, handles HTTP requests - as described in RFC 2616 with a few exceptions such as gateway - and proxy functionality. The server supports ipv6 as long as the - underlying mechanisms also do so.

- -

The server implements numerous features such as SSL (Secure Sockets - Layer), ESI (Erlang Scripting Interface), CGI (Common Gateway - Interface), User Authentication(using Mnesia, dets or plain text - database), Common Logfile Format (with or without disk_log(3) - support), URL Aliasing, Action Mappings, and Directory Listings

- -

The configuration of the server is provided as an erlang - property list, and for backwards compatibility also a configuration + as described in + RFC 2616 + with a few exceptions, such as gateway + and proxy functionality. The server supports IPv6 as long as the + underlying mechanisms also do so.

+ +

The server implements numerous features, such as:

+ + Secure Sockets Layer (SSL) + Erlang Scripting Interface (ESI) + Common Gateway Interface (CGI) + User Authentication (using Mnesia, + Dets or plain text database) + Common Logfile Format (with or without disk_log(3) support) + URL Aliasing + Action Mappings + Directory Listings + + +

The configuration of the server is provided as an Erlang + property list. For backwards compatibility, a configuration file using apache-style configuration directives is supported.

-

As of inets version 5.0 the HTTP server is an easy to - start/stop and customize web server that provides the most basic - web server functionality. Depending on your needs there - are also other erlang based web servers that may be of interest - such as Yaws, http://yaws.hyber.org, that for instance has its own - markup support to generate html, and supports certain buzzword - technologies such as SOAP.

+

As of Inets 5.0 the HTTP server is an easy to + start/stop and customize web server providing the most basic + web server functionality. Depending on your needs, there + are also other Erlang-based web servers that can be of interest + such as Yaws, which, + for example, has its own + markup support to generate HTML and supports certain buzzword + technologies, such as SOAP.

-

Allmost all server functionality has been implemented using an - especially crafted server API which is described in the Erlang Web - Server API. This API can be used to advantage by all who wish +

Almost all server functionality has been implemented using an + especially crafted server API, which is described in the Erlang Web + Server API. This API can be used to enhance the core server functionality, for example with custom logging and authentication.

- -
- -
- Configuration - -

What to put in the erlang node application configuration file - in order to start a http server at application startup.

+

The following is to be put in the Erlang node application configuration + file to start an HTTP server at application startup:

[{inets, [{services, [{httpd, [{proplist_file, "/var/tmp/server_root/conf/8888_props.conf"}]}, {httpd, [{proplist_file, - "/var/tmp/server_root/conf/8080_props.conf"}]}]}]}]. - - -

The server is configured using an erlang property list. - For the available properties see - httpd(3) - For backwards compatibility also apache-like config files - are supported. + "/var/tmp/server_root/conf/8080_props.conf"}]}]}]}]. + +

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

-

All possible config properties are as follows

+

The available configuration properties are as follows:

httpd_service() -> {httpd, httpd()} httpd() -> [httpd_config()] @@ -103,40 +106,43 @@ debug_options() -> {all_functions, modules()} | {exported_functions, modules()} | {disable, modules()} - modules() -> [atom()] - -

{proplist_file, file()} File containing an erlang property + modules() -> [atom()] +

Here:

+ + {file, file()} +

If you use an old apace-like configuration file.

+ {proplist_file, file()} +

File containing an Erlang property list, followed by a full stop, describing the HTTP server - configuration.

-

{file, file()} If you use an old apace-like configuration file.

-

{debug, debug()} - Can enable trace on all - functions or only exported functions on chosen modules.

-

{accept_timeout, integer()} sets the wanted timeout value for - the server to set up a request connection.

- - + configuration.

+ {debug, debug()} +

Can enable trace on all functions or only exported functions + on chosen modules.

+ {accept_timeout, integer()} +

Sets the wanted time-out value for + the server to set up a request connection.

+
- Using the HTTP Server API + Getting Started + +

Start Inets:

1 > inets:start(). - ok - -

Start a HTTP server with minimal - required configuration. Note that if you - specify port 0 an arbitrary available port will be - used and you can use the info function to find out - which port number that was picked. -

+ ok +

Start an HTTP server with minimal required configuration. + If you specify port 0, an arbitrary available port is + used, and you can use function info to find which port + number that was picked:

2 > {ok, Pid} = inets:start(httpd, [{port, 0}, {server_name,"httpd_test"}, {server_root,"/tmp"}, {document_root,"/tmp/htdocs"}, {bind_address, "localhost"}]). - {ok, 0.79.0} - + {ok, 0.79.0} +

Call info:

3 > httpd:info(Pid). [{mime_types,[{"html","text/html"},{"htm","text/html"}]}, @@ -144,325 +150,312 @@ {bind_address, {127,0,0,1}}, {server_root,"/tmp"}, {port,59408}, - {document_root,"/tmp/htdocs"}] - + {document_root,"/tmp/htdocs"}] -

Reload the configuration without restarting the server. - Note port and bind_address can not be changed. Clients - trying to access the server during the reload will - get a service temporary unavailable answer. +

Reload the configuration without restarting the server: +

4 > httpd:reload_config([{port, 59408}, {server_name,"httpd_test"}, {server_root,"/tmp/www_test"}, {document_root,"/tmp/www_test/htdocs"}, {bind_address, "localhost"}], non_disturbing). - ok. - + ok. + +

port and bind_address cannot be changed. + Clients trying to access the server during the reload + get a service temporary unavailable answer.

5 > httpd:info(Pid, [server_root, document_root]). - [{server_root,"/tmp/www_test"},{document_root,"/tmp/www_test/htdocs"}] - + [{server_root,"/tmp/www_test"},{document_root,"/tmp/www_test/htdocs"}] - 6 > ok = inets:stop(httpd, Pid). - + 6 > ok = inets:stop(httpd, Pid). -

Alternative:

+

Alternative:

- 6 > ok = inets:stop(httpd, {{127,0,0,1}, 59408}). - + 6 > ok = inets:stop(httpd, {{127,0,0,1}, 59408}). -

Note that bind_address has to be - the ip address reported by the info function and can - not be the hostname that is allowed when inputting bind_address.

- - +

Notice that bind_address must be the IP address reported + by function info and cannot be the hostname that is allowed + when putting in bind_address.

Htaccess - User Configurable Authentication. -

If users of the web server needs to manage authentication of - web pages that are local to their user and do not have - server administrative privileges. They can use the - per-directory runtime configurable user-authentication scheme - that Inets calls htaccess. It works the following way:

+ +

Web server users without server administrative privileges + that need to manage authentication of web pages that are local + to their user can use the per-directory runtime configurable + user-authentication scheme htaccess. + It works as follows:

Each directory in the path to the requested asset is - searched for an access-file (default .htaccess), that restricts - the web servers rights to respond to a request. If an access-file - is found the rules in that file is applied to the - request. - The rules in an access-file applies both to files in the same - directories and in subdirectories. If there exists more than one - access-file in the path to an asset, the rules in the - access-file nearest the requested asset will be applied. - To change the rules that restricts the use of - an asset. The user only needs to have write access - to the directory where the asset exists. - All the access-files in the path to a requested asset is read - once per request, this means that the load on the server will - increase when this scheme is used. - If a directory is - limited both by auth directives in the HTTP server configuration - file and by the htaccess files. The user must be allowed to get - access the file by both methods for the request to succeed. + searched for an access file (default is .htaccess), which + restricts the web servers rights to respond to a request. + If an access file is found, the rules in that file is applied to the + request. + The rules in an access file apply to files in the same + directory and in subdirectories. If there exists more than one + access file in the path to an asset, the rules in the + access file nearest the requested asset is applied. + To change the rules that restrict the use of + an asset, the user only needs write access + to the directory where the asset is. + All access files in the path to a requested asset are read + once per request. This means that the load on the server + increases when htaccess is used. + If a directory is limited both by authentication directives + in the HTTP server configuration file and by the htaccess + files, the user must be allowed to get access to the file by both + methods for the request to succeed.
Access Files Directives -

In every directory under the DocumentRoot or under an - Alias a user can place an access-file. An access-file - is a plain text file that specify the restrictions that - shall be considered before the web server answer to a - request. If there are more than one access-file in the path - to the requested asset, the directives in the access-file in - the directory nearest the asset will be used.

- +

In every directory under DocumentRoot or under an + Alias a user can place an access file. An access file + is a plain text file that specifies the restrictions to + consider before the web server answers to a + request. If there are more than one access file in the path + to the requested asset, the directives in the access file in + the directory nearest the asset is used.

+ + "allow" -

DIRECTIVE: "allow"

-

Syntax:Allow from subnet subnet|from all

-Default:from all

-

-

Same as the directive allow for the server config file.

+

Syntax: Allow from subnet subnet | from all

+

Default: from all

+

Same as directive allow for the server configuration file.

- -

DIRECTIVE: "AllowOverRide"

-

Syntax:AllowOverRide all | none | - Directives

-Default:- None -

-AllowOverRide Specify which parameters that not - access-files in subdirectories are allowed to alter the value - for. If the parameter is set to none no more - access-files will be parsed. + "AllowOverRide" + +

Syntax: AllowOverRide all | none | Directives

+

Default: none

+

AllowOverRide specifies the parameters that + access files in subdirectories are not allowed to alter the value + for. If the parameter is set to none, no further + access files is parsed.

-

If only one access-file exists setting this parameter to - none can lessen the burden on the server since the server - will stop looking for access-files.

+

If only one access file exists, setting this parameter to + none can ease the burden on the server as the server + then stops looking for access files.

+ "AuthGroupfile" -

DIRECTIVE: "AuthGroupfile"

-

Syntax:AuthGroupFile Filename

-Default:- None -

-

-

AuthGroupFile indicates which file that contains the list - of groups. Filename must contain the absolute path to the - file. The format of the file is one group per row and +

Syntax: AuthGroupFile Filename

+

Default: none

+

AuthGroupFile indicates which file that contains the list + of groups. The filename must contain the absolute path to the + file. The format of the file is one group per row and every row contains the name of the group and the members - of the group separated by a space, for example:

+ of the group, separated by a space, for example:

-GroupName: Member1 Member2 .... MemberN
-            
+GroupName: Member1 Member2 .... MemberN
+ "AuthName" -

DIRECTIVE: "AuthName"

-

Syntax:AuthName auth-domain

-Default:- None -

-

-

Same as the directive AuthName for the server config file.

+

Syntax: AuthName auth-domain

+

Default: none

+

Same as directive AuthName for the server + configuration file.

+ "AuthType" -

DIRECTIVE: "AuthType"

-

Syntax:AuthType Basic

-Default:Basic

-

-

AuthType Specify which authentication scheme that shall - be used. Today only Basic Authenticating using UUEncoding of - the password and user ID is implemented.

+

Syntax: AuthType Basic

+

Default: Basic

+

AuthType specifies which authentication scheme to + be used. Only Basic Authenticating using UUEncoding of + the password and user ID is implemented.

+ "AuthUserFile" -

DIRECTIVE: "AuthUserFile"

-

Syntax:AuthUserFile Filename

-Default:- None -

-

-

AuthUserFile indicate which file that contains the list - of users. Filename must contain the absolute path to the - file. The users name and password are not encrypted so do not +

Syntax: AuthUserFile Filename

+

Default:none

+

AuthUserFile indicates which file that contains the list + of users. The filename must contain the absolute path to the + file. The username and password are not encrypted so do not place the file with users in a directory that is accessible - via the web server. The format of the file is one user per row - and every row contains User Name and Password separated by a - colon, for example:

+ through the web server. The format of the file is one user per row. + Every row contains UserName and Password separated + by a colon, for example:

 UserName:Password
-UserName:Password
-            
+UserName:Password
+ "deny" -

DIRECTIVE: "deny"

-

Syntax:deny from subnet subnet|from all

-Context: Limit

-

Same as the directive deny for the server config file.

+

Syntax: deny from subnet subnet | from all

+

Context: Limit

+

Same as directive deny for the server configuration file.

- -

DIRECTIVE: "Limit"

-

-

Syntax: RequestMethods>

-Default: - None -

-

-

]]> and </Limit> are used to enclose - a group of directives which applies only to requests using - the specified methods. If no request method is specified + "Limit" + +

Syntax: RequestMethods>

+

Default: none

+

]]> and </Limit> are used to enclose + a group of directives applying only to requests using + the specified methods. If no request method is specified, all request methods are verified against the restrictions.

+

Example:

 <Limit POST GET HEAD>
   order allow deny
   require group group1
   allow from 123.145.244.5
-</Limit>
-            
+</Limit>
- -

DIRECTIVE: "order"

-Syntax:order allow deny | deny allow

-Default: allow deny

-

-

order, defines if the deny or allow control shall - be preformed first.

-

If the order is set to allow deny, then first the users - network address is controlled to be in the allow subset. If - the users network address is not in the allowed subset he will - be denied to get the asset. If the network-address is in the - allowed subset then a second control will be preformed, that - the users network address is not in the subset of network - addresses that shall be denied as specified by the deny - parameter.

-

If the order is set to deny allow then only users from networks - specified to be in the allowed subset will succeed to request + "order" + +

Syntax: order allow deny | deny allow

+

Default: allow deny

+

order defines if the deny or allow control is to + be performed first.

+

If the order is set to allow deny, the users + network address is first controlled to be in the allow subset. + If the user network address is not in the allowed subset, the user + is denied to get the asset. If the network address is in the + allowed subset, a second control is performed. That is, + the user network address is not in the subset of network + addresses to be denied as specified by parameter deny.

+

If the order is set to deny allow, only users from networks + specified to be in the allowed subset succeeds to request assets in the limited area.

- -

DIRECTIVE: "require"

-

Syntax:require - group group1 group2...|user user1 user2...

-Default:- None -

-Context: Limit

-

-

See the require directive in the documentation of mod_auth(3) - for more information.

+ "require" + +

Syntax: require + group group1 group2... | user user1 user2...

+

Default: none

+

Context: Limit

+

For more information, see directive require in + mod_auth(3).

-
+
- -
Dynamic Web Pages -

The Inets HTTP server provides two ways of creating dynamic web - pages, each with its own advantages and disadvantages.

-

First there are CGI-scripts that can be written in any programming - language. CGI-scripts are standardized and supported by most - web servers. The drawback with CGI-scripts is that they are resource - intensive because of their design. CGI requires the server to fork a - new OS process for each executable it needs to start.

-

Second there are ESI-functions that provide a tight and efficient - interface to the execution of Erlang functions, this interface - on the other hand is Inets specific.

- + +

Inets HTTP server provides two ways of creating dynamic web + pages, each with its own advantages and disadvantages:

+ + CGI scripts +

Common Gateway Interface (CGI) scripts can be written + in any programming language. CGI scripts are standardized and + supported by most web servers. The drawback with CGI scripts is that + they are resource-intensive because of their design. CGI requires the + server to fork a new OS process for each executable it needs to start. +

+ ESI-functions +

Erlang Server Interface (ESI) functions provide a tight and efficient + interface to the execution of Erlang functions. This interface, + on the other hand, is Inets specific.

+
+
- The Common Gateway Interface (CGI) Version 1.1, RFC 3875. -

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 + CGI Version 1.1, RFC 3875 +

The module mod_cgi enables execution of CGI scripts + on the server. A file matching the definition of a + ScriptAlias config directive is treated as a CGI script. A CGI script is executed by the server and its output is returned to - the client.

-

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:

+ the client.

+

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 can be + empty.

+

Example:

"Content-Type:text/plain\nAccept-Ranges:none\n\nsome very - plain text" + 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.

-

Support for CGI-1.1 is implemented in accordance with the RFC - 3875.

+

The server interprets the message headers and most of them + are transformed into HTTP headers and sent back to the + client together with the message-body.

+

Support for CGI-1.1 is implemented in accordance with + RFC 3875.

- Erlang Server Interface (ESI) -

The erlang server interface is implemented by the - module mod_esi.

+ ESI +

The Erlang server interface is implemented by + module mod_esi.

- ERL Scheme + ERL Scheme

The erl scheme is designed to mimic plain CGI, but without - the extra overhead. An URL which calls an Erlang erl function + the extra overhead. An URL that calls an Erlang erl function has the following syntax (regular expression):

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

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

-

The module (Module) referred to must be found in the code - path, and it must define a function (Function) with an arity - of two or three. It is preferable to implement a funtion - with arity three as it permits you to send chunks of the - webpage beeing generated to the client during the generation +http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo) +

*** depends on how the ErlScriptAlias config + directive has been used.

+

The module Module referred to must be found in the code + path, and it must define a function Function with an arity + of two or three. It is preferable to implement a function + with arity three, as it permits to send chunks of the + web page to the client during the generation phase instead of first generating the whole web page and then sending it to the client. The option to implement a function with arity two is only kept for backwards compatibility reasons. - See mod_esi(3) for - implementation details of the esi callback function.

+ For implementation details of the ESI callback function, + see mod_esi(3).

- EVAL Scheme + EVAL Scheme

The eval scheme is straight-forward and does not mimic the - behavior of plain CGI. An URL which calls an Erlang eval + behavior of plain CGI. An URL that calls an Erlang eval function has the following syntax:

-http://your.server.org/***/Mod:Func(Arg1,...,ArgN) - -

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

-

The module (Mod) referred to must be found in the code - path, and data returned by the function (Func) is passed +http://your.server.org/***/Mod:Func(Arg1,...,ArgN) +

*** depends on how the ErlScriptAlias config + directive has been used.

+

The module Mod referred to must be found in the code + path and data returned by the function Func is passed back to the client. Data returned from the - function must furthermore take the form as specified in - the CGI specification. See mod_esi(3) for implementation details of the esi - callback function.

+ function must take the form as specified in + the CGI specification. For implementation details of the ESI + callback function, + see mod_esi(3).

The eval scheme can seriously threaten the - integrity of the Erlang node housing a Web server, for - example:

+ integrity of the Erlang node housing a web server, for + example:

-http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[]))) - -

which effectively will close down the Erlang node, - 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 - release of Inets.

+http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[]))) +

This effectively closes down the Erlang node. + Therefore, use the erl scheme instead, until this + security breach is fixed.

+

Today there are no good ways of solving this problem + and therefore the eval scheme can be removed in future + release of Inets.

- -
- Logging -

There are three types of logs supported. Transfer logs, - security logs and error logs. The de-facto standard Common + Logging + +

Three types of logs are supported: transfer logs, + security logs, and error logs. The de-facto standard Common Logfile Format is used for the transfer and security logging. There are numerous statistics programs available to analyze Common Logfile Format. The Common Logfile Format looks as follows:

remotehost rfc931 authuser [date] "request" status bytes

+

Here:

remotehost - Remote hostname + Remote hostname. rfc931 - The client's remote username (RFC 931). + The client remote username (RFC 931). authuser - The username with which the user authenticated himself. + The username used for authentication. [date] Date and time of the request (RFC 1123). "request" @@ -473,7 +466,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ The content-length of the document transferred.

Internal server errors are recorded in the error log file. The - format of this file is a more ad hoc format than the logs using + format of this file is a more unplanned format than the logs using Common Logfile Format, but conforms to the following syntax:

[date] access to path failed for @@ -481,73 +474,79 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[

- The Erlang Web Server API -

The process of handling a HTTP request involves several steps + Erlang Web Server API +

The process of handling an HTTP request involves several steps, such as:

- Seting up connections, sending and receiving data. - URI to filename translation - Authenication/access checks. - Retriving/generating the response. - Logging + Setting up connections, sending and receiving data. + URI to filename translation. + Authentication/access checks. + Retrieving/generating the response. + Logging. -

To provide customization and extensibility of the HTTP servers - request handling most of these steps are handled by one or more - modules that may be replaced or removed at runtime, and of course - new ones can be added. For each request all modules will be - traversed in the order specified by the modules directive in the - server configuration file. Some parts mainly the communication - related steps are considered server core functionality and are - not implemented using the Erlang Web Server API. A description of - functionality implemented by the Erlang Webserver API is described - in the section Inets Webserver Modules.

+

To provide customization and extensibility of the request + handling of the HTTP servers, most of these steps are handled by + one or more modules. These modules can be replaced or removed at + runtime and new ones can be added. For each request, all modules are + traversed in the order specified by the module directive in the + server configuration file. Some parts, mainly the communication- + related steps, are considered server core functionality and are + not implemented using the Erlang web server API. A description of + functionality implemented by the Erlang webserver API is described + in Section + Inets Web Server Modules.

+

A module can use data generated by previous modules in the - Erlang Webserver API module sequence or generate data to be used - by consecutive Erlang Web Server API modules. This is made - possible due to an internal list of key-value tuples, also referred to - as interaction data.

+ Erlang webserver API module sequence or generate data to be used + by consecutive Erlang Web Server API modules. This is + possible owing to an internal list of key-value tuples, referred to + as interaction data.

Interaction data enforces module dependencies and - should be avoided if possible. This means the order - of modules in the Modules property is significant.

+ is to be avoided if possible. This means that the order + of modules in the modules property is significant.

API Description -

Each module implements server functionality - using the Erlang Web Server API should implement the following +

Each module that implements server functionality + using the Erlang web server API is to implement the following call back functions:

- do/1 (mandatory) - the function called when - a request should be handled. - load/2 - store/2 - remove/1 + do/1 (mandatory) - the function called when + a request is to be handled + load/2 + store/2 + remove/1

The latter functions are needed only when new config - directives are to be introduced. For details see - httpd(3)

+ directives are to be introduced. For details, see + httpd(3).

- Inets Web Server Modules

The convention is that - all modules implementing some webserver functionality has the - name mod_*. When configuring the web server an appropriate - selection of these modules should be present in the Module - directive. Please note that there are some interaction dependencies - to take into account so the order of the modules can not be - totally random.

+ Inets Web Server Modules + +

The convention is that + all modules implementing some web server functionality has the + name mod_*. When configuring the web server, an appropriate + selection of these modules is to be present in the module + directive. Notice that there are some interaction dependencies + to take into account, so the order of the modules cannot be + random.

- mod_action - Filetype/Method-Based Script Execution. -

Runs CGI scripts whenever a file of a - certain type or HTTP method (See RFC 1945) is requested. + mod_action - Filetype/Method-Based Script Execution +

This module runs CGI scripts whenever a file of a + certain type or HTTP method (see + RFC 1945RFC 1945) + is requested.

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data, if possible:

@@ -559,48 +558,51 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[
mod_alias - URL Aliasing -

This module makes it possible to map different parts of the - host file system into the document tree e.i. creates aliases and +

The mod_alias + module makes it possible to map different parts of the + host file system into the document tree, that is, creates aliases and redirections.

Exports the following Erlang Web Server API interaction data, if possible:

{real_name, PathData} - PathData is the argument used for API function mod_alias:path/3. + PathData is the argument used for API function + mod_alias:path/3.
- mod_auth - User Authentication -

This module provides for basic user authentication using - textual files, dets databases as well as mnesia databases.

+ mod_auth - User Authentication +

The mod_auth(3) + module provides for basic user authentication using + textual files, Dets databases as well as Mnesia databases.

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

{remote_user, User} - The user name with which the user has authenticated himself. + The username used for authentication.
- Mnesia as Authentication Database + Mnesia As Authentication Database -

If Mnesia is used as storage method, Mnesia must be - started prio to the HTTP server. The first time Mnesia is - started the schema and the tables must be created before - Mnesia is started. A naive example of a module with two - functions that creates and start mnesia is provided - here. The function shall be used the first - time. first_start/0 creates the schema and the tables. The - second function start/0 shall be used in consecutive - startups. start/0 Starts Mnesia and wait for the tables to +

If Mnesia is used as storage method, Mnesia must be + started before the HTTP server. The first time Mnesia is + started, the schema and the tables must be created before + Mnesia is started. A simple example of a module with two + functions that creates and start Mnesia is provided + here. Function first_start/0 is to be used the first + time. It creates the schema and the tables. + start/0 is to be used in consecutive startups. + start/0 starts Mnesia and waits for the tables to be initiated. This function must only be used when the - schema and the tables already is created.

+ schema and the tables are already created.

-module(mnesia_test). @@ -624,28 +626,28 @@ first_start() -> start() -> mnesia:start(), - mnesia:wait_for_tables([httpd_user, httpd_group], 60000). - + mnesia:wait_for_tables([httpd_user, httpd_group], 60000). -

To create the Mnesia tables we use two records defined in - mod_auth.hrl so the file must be included. The first - function first_start/0 creates a schema that specify on - which nodes the database shall reside. Then it starts Mnesia - and creates the tables. The first argument is the name of - the tables, the second argument is a list of options how the - table will be created, see Mnesia documentation for more - information. Since the current implementation of the - mod_auth_mnesia saves one row for each user the type must be - bag. When the schema and the tables is created the second - function start/0 shall be used to start Mensia. It starts - Mnesia and wait for the tables to be loaded. Mnesia use the - directory specified as mnesia_dir at startup if specified, - otherwise Mnesia use the current directory. For security - reasons, make sure that the Mnesia tables are stored outside - the document tree of the HTTP server. If it is placed in the - directory which it protects, clients will be able to - download the tables. Only the dets and mnesia storage - methods allow writing of dynamic user data to disk. plain is +

To create the Mnesia tables, we use two records defined in + mod_auth.hrl, so that file must be included. first_start/0 + creates a schema that specifies on which nodes the database is to reside. + Then it starts Mnesia and creates the tables. The first argument + is the name of the tables, the second argument is a list of options of + how to create the table, see + mnesia, documentation for + more information. As the implementation of the mod_auth_mnesia + saves one row for each user, the type must be bag. + When the schema and the tables are created, function + mnesia:start/0 + is used to start Mnesia and + waits for the tables to be loaded. Mnesia uses the + directory specified as mnesia_dir at startup if specified, + otherwise Mnesia uses the current directory. For security + reasons, ensure that the Mnesia tables are stored outside + the document tree of the HTTP server. If they are placed in the + directory which it protects, clients can download the tables. + Only the Dets and Mnesia storage + methods allow writing of dynamic user data to disk. plain is a read only method.

@@ -653,19 +655,19 @@ start() ->
mod_cgi - CGI Scripts -

This module handles invoking of CGI scripts

+

This module handles invoking of CGI scripts.

mod_dir - Directories

This module generates an HTML directory listing (Apache-style) if a client sends a request for a directory - instead of a file. This module needs to be removed from the + instead of a file. This module must be removed from the Modules config directive if directory listings is unwanted.

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

@@ -677,27 +679,27 @@ start() ->
- mod_disk_log - Logging Using disk_log. + mod_disk_log - Logging Using Disk_Log.

Standard logging using the "Common Logfile Format" and - disk_log(3).

+ kernel:disk_log(3).

Uses the following Erlang Web Server API interaction data:

- remote_user - from mod_auth + remote_user - from mod_auth
mod_esi - Erlang Server Interface -

This module implements - the Erlang Server Interface (ESI) that provides a tight and - efficient interface to the execution of Erlang functions.

-

Uses the following Erlang Web Server API interaction data: +

The mod_esi(3) + module implements the Erlang Server Interface (ESI) providing a + tight and efficient interface to the execution of Erlang functions.

+

Uses the following Erlang web server API interaction data:

- remote_user - from mod_auth + remote_user - from mod_auth -

Exports the following Erlang Web Server API interaction data: +

Exports the following Erlang web server API interaction data:

{mime_type, MimeType} @@ -709,11 +711,11 @@ start() ->
mod_get - Regular GET Requests

This module is responsible for handling GET requests to regular - files. GET requests for parts of files is handled by mod_range.

-

Uses the following Erlang Web Server API interaction data: + files. GET requests for parts of files is handled by mod_range.

+

Uses the following Erlang web server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias
@@ -725,7 +727,7 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias
@@ -736,13 +738,13 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

{remote_user_name, User} - The user name with which the user has authenticated himself. + The username used for authentication.
@@ -750,84 +752,83 @@ start() -> mod_log - Logging Using Text Files.

Standard logging using the "Common Logfile Format" and text files.

-

Uses the following Erlang Webserver API interaction data: +

Uses the following Erlang Web Server API interaction data:

- remote_user - from mod_auth + remote_user - from mod_auth
mod_range - Requests with Range Headers -

This module response to requests for one or many ranges of a - file. This is especially useful when downloading large files, - since a broken download may be resumed.

-

Note that request for multiple parts of a document will report a +

This module responses to requests for one or many ranges of a + file. This is especially useful when downloading large files, + as a broken download can be resumed.

+

Notice that request for multiple parts of a document report a size of zero to the log file.

-

Uses the following Erlang Webserver API interaction data: +

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias
mod_response_control - Requests with If* Headers -

This module controls that the conditions in the requests is - fulfilled. For example a request may specify that the answer - only is of interest if the content is unchanged since last - retrieval. Or if the content is changed the range-request shall - be converted to a request for the whole file instead.

If - a client sends more then one of the header fields that restricts - the servers right to respond, the standard does not specify how - this shall be handled. httpd will control each field in the - following order and if one of the fields not match the current - state the request will be rejected with a proper response. -

+

This module controls that the conditions in the requests are + fulfilled. For example, a request can specify that the answer + only is of interest if the content is unchanged since the last + retrieval. If the content is changed, the range request is to + be converted to a request for the whole file instead.

+

If a client sends more than one of the header fields that + restricts the servers right to respond, the standard does not + specify how this is to be handled. + httpd(3) controls each + field in the following order and if one of the fields does not + match the current state, the request is rejected with a proper + response:

+

If-modified

+

If-Unmodified

+

If-Match

+

If-Nomatch

- 1.If-modified

- - 2.If-Unmodified

- - 3.If-Match

- - 4.If-Nomatch

-

-

Uses the following Erlang Webserver API interaction data: +

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias -

Exports the following Erlang Webserver API interaction data: +

Exports the following Erlang Web Server API interaction data:

{if_range, send_file} - The conditions for the range request was not fulfilled. + The conditions for the range request are not fulfilled. The response must not be treated as a range request, instead it - must be treated as a ordinary get request. + must be treated as an ordinary get request.
mod_security - Security Filter -

This module serves as a filter for authenticated requests - handled in mod_auth. It provides possibility to restrict users - from access for a specified amount of time if they fail to +

The mod_security + module serves as a filter for authenticated requests + handled in mod_auth(3). + It provides a possibility to restrict users from + access for a specified amount of time if they fail to authenticate several times. It logs failed authentication as - well as blocking of users, and it also calls a configurable - call-back module when the events occur.

+ well as blocking of users, and it calls a configurable + callback module when the events occur.

There is also an - API to manually block, unblock and list blocked users or users, - who have been authenticated within a configurable amount of - time.

+ API to block or unblock users manually. This API can also list + blocked users or users who have been authenticated within a + configurable amount of time.

mod_trace - TRACE Request -

mod_trace is responsible for handling of TRACE requests. +

mod_trace is responsible for handling of TRACE requests. Trace is a new request method in HTTP/1.1. The intended use of trace requests is for testing. The body of the trace response is - the request message that the responding Web server or proxy + the request message that the responding web server or proxy received.

diff --git a/lib/inets/doc/src/inets_services.xml b/lib/inets/doc/src/inets_services.xml index f78485cb64..d100216ebb 100644 --- a/lib/inets/doc/src/inets_services.xml +++ b/lib/inets/doc/src/inets_services.xml @@ -22,7 +22,7 @@ - Introduction + Inets Ingela Anderton Andin @@ -34,45 +34,26 @@
- Purpose -

Inets is a container for Internet clients and - servers. Currently, an client and server, a - TFPT client and server, and a FTP client has been incorporated - into Inets. The HTTP server and client is HTTP 1.1 compliant as - defined in 2616.

-
- -
- Prerequisites -

It is assumed that the reader is familiar with the Erlang - programming language, concepts of OTP and has a basic - understanding of the HTTP, TFTP and FTP protocols.

-
- -
- The Service Concept -

Each client and server in inets is viewed as service. Services - may be configured to be started at application startup or - started dynamically in runtime. If you want to run inets as an - distributed application that should handle application failover - and takeover, services should be configured to be started at - application startup. When starting the inets application - the inets top supervisor will start a number of subsupervisors - and worker processes for handling the different services - provided. When starting services dynamically new children will - be added to the supervision tree, unless the service is started - with the stand alone option, in which case the service is linked - to the calling process and all OTP application features such as - soft upgrade are lost.

-

Services that should be configured for startup at application - startup time should be put into the erlang node configuration file - on the form:

+ Service Concept +

Each client and server in Inets is viewed as a service. + Services can be configured to be started at application startup or + dynamically in runtime. To run Inets as a distributed + application that handles application failover and takeover, + configure the services to be started at application startup. + When starting the Inets application, the Inets + top supervisor starts a number of subsupervisors and worker + processes for handling the provided services. + When starting services dynamically, new children are added to the + supervision tree, unless the service is started with the standalone + option. In this case the service is linked to the calling process + and all OTP application features, such as soft upgrade, are lost.

+

Services to be configured for startup at application startup are to + be put into the Erlang node configuration file + on the following form:

-      [{inets, [{services, ListofConfiguredServices}]}].
-    
-

For details of exactly what to put in the list of configured - services see the documentation for the services that should be - configured.

+ [{inets, [{services, ListofConfiguredServices}]}]. +

For details of what to put in the list of configured services, + see the documentation for the services to be configured.

diff --git a/lib/inets/doc/src/introduction.xml b/lib/inets/doc/src/introduction.xml new file mode 100644 index 0000000000..ef3e109df5 --- /dev/null +++ b/lib/inets/doc/src/introduction.xml @@ -0,0 +1,57 @@ + + + + +
+ + 19972013 + 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. + + + + Introduction + Ingela Anderton Andin + + + + + 2004-09-28 + A + inets_services.xml +
+ +
+ Purpose +

Inets is a container for Internet clients and servers + including the following:

+ + An FTP client + A TFTP client and server + An client and server + +

The HTTP client and server are HTTP 1.1 compliant as + defined in + RFC 2616.

+
+ +
+ Prerequisites +

It is assumed that the reader is familiar with the Erlang + programming language, concepts of OTP, and has a basic + understanding of the FTP, TFTP, and HTTP protocols.

+
+
+ + diff --git a/lib/inets/doc/src/part.xml b/lib/inets/doc/src/part.xml index 1640ff507c..3b817eecf2 100644 --- a/lib/inets/doc/src/part.xml +++ b/lib/inets/doc/src/part.xml @@ -30,10 +30,18 @@ part.sgml -

The Inets Application provides a set of Internet - related services. Currently supported are a HTTP client, a HTTP - server a FTP client and a TFTP client and server.

+

The Inets application provides a set of + Internet-related services as follows:

+ + An FTP client + A TFTP client and server + An client and server + +

The HTTP client and server are HTTP 1.1 compliant as + defined in + RFC 2616.

+ -- cgit v1.2.3 From a2a1883e04aaa923b385cbbc496395ed5bf1dc17 Mon Sep 17 00:00:00 2001 From: tmanevik Date: Mon, 6 Jul 2015 21:21:27 +0200 Subject: Inets Reference Manual Editorial changes --- lib/inets/doc/src/ftp.xml | 467 +++++++++--------- lib/inets/doc/src/http_uri.xml | 96 ++-- lib/inets/doc/src/httpc.xml | 658 +++++++++++++------------ lib/inets/doc/src/httpd.xml | 986 +++++++++++++++++++------------------ lib/inets/doc/src/httpd_socket.xml | 24 +- lib/inets/doc/src/httpd_util.xml | 177 ++++--- lib/inets/doc/src/inets.xml | 93 ++-- lib/inets/doc/src/mod_alias.xml | 58 ++- lib/inets/doc/src/mod_auth.xml | 260 +++++----- lib/inets/doc/src/mod_esi.xml | 73 +-- lib/inets/doc/src/mod_security.xml | 106 ++-- lib/inets/doc/src/ref_man.xml | 6 +- lib/inets/doc/src/tftp.xml | 325 ++++++------ 13 files changed, 1688 insertions(+), 1641 deletions(-) diff --git a/lib/inets/doc/src/ftp.xml b/lib/inets/doc/src/ftp.xml index f3d4a5c45d..2e6176d011 100644 --- a/lib/inets/doc/src/ftp.xml +++ b/lib/inets/doc/src/ftp.xml @@ -30,95 +30,94 @@ ftp.xml ftp - A File Transfer Protocol client + A File Transfer Protocol client. -

The ftp module implements a client for file transfer - according to a subset of the File Transfer Protocol (see 959).

+

This module implements a client for file transfer + according to a subset of the File Transfer Protocol (FTP), see + RFC 959.

-

Starting from inets version 4.4.1 the ftp - client will always try to use passive ftp mode and only resort - to active ftp mode if this fails. There is a start option - mode where this default behavior - may be changed.

+

As from Inets 4.4.1, the FTP + client always tries to use passive FTP mode and only resort + to active FTP mode if this fails. This default behavior can be + changed by start option mode.

-

There are two ways to start an ftp client. One is using the - Inets service framework - and the other is to start it directy as a standalone process - using the open function.

+

An FTP client can be started in two ways. One is using the + Inets service framework, + the other is to start it directly as a standalone process + using function open.

-

For a simple example of an ftp session see - Inets User's Guide.

+

For a simple example of an FTP session, see + Inets User's Guide.

In addition to the ordinary functions for receiving and sending - files (see recv/2, recv/3, send/2 and + files (see recv/2, recv/3, send/2, and send/3) there are functions for receiving remote files as - binaries (see recv_bin/2) and for sending binaries to to be + binaries (see recv_bin/2) and for sending binaries to be stored as remote files (see send_bin/3).

-

There is also a set of functions for sending and receiving - contiguous parts of a file to be stored in a remote file (for send - see send_chunk_start/2, send_chunk/2 and - send_chunk_end/1 and for receive see +

A set of functions is provvided for sending and receiving + contiguous parts of a file to be stored in a remote file. For send, + see send_chunk_start/2, send_chunk/2, and + send_chunk_end/1. For receive, see recv_chunk_start/2 and recv_chunk/).

-

The particular return values of the functions below depend very +

The return values of the following functions depend much on the implementation of the FTP server at the remote - host. In particular the results from ls and nlist + host. In particular, the results from ls and nlist varies. Often real errors are not reported as errors by ls, - even if for instance a file or directory does not + even if, for example, a file or directory does not exist. nlist is usually more strict, but some implementations have the peculiar behaviour of responding with an - error, if the request is a listing of the contents of directory - which exists but is empty.

+ error if the request is a listing of the contents of a directory + that exists but is empty.

- FTP CLIENT SERVICE START/STOP + FTP CLIENT SERVICE START/STOP

The FTP client can be started and stopped dynamically in runtime by - calling the Inets application API + calling the Inets application API inets:start(ftpc, ServiceConfig), or inets:start(ftpc, ServiceConfig, How), and inets:stop(ftpc, Pid). - See inets(3) for more info.

-

Below follows a description of - the available configuration options.

+ For details, see inets(3).

+ +

The available configuration options are as follows:

{host, Host} -

Host = string() | ip_address()

+

Host = string() | ip_address()

{port, Port} -

Port = integer() > 0

-

Default is 21.

+

Port = integer() > 0

+

Default is 21.

{mode, Mode} -

Mode = active | passive

-

Default is passive.

+

Mode = active | passive

+

Default is passive.

{verbose, Verbose}

Verbose = boolean()

-

This determines if the FTP communication should be - verbose or not.

-

Default is false.

+

Determines if the FTP communication is to be + verbose or not.

+

Default is false.

{debug, Debug} @@ -126,93 +125,90 @@

Debug = trace | debug | disable

Debugging using the dbg toolkit.

-

Default is disable.

+

Default is disable.

{ipfamily, IpFamily}

IpFamily = inet | inet6 | inet6fb4

-

With inet6fb4 the client behaves as before - (it tries to use IPv6 and only if that does not work, it - uses IPv4).

-

Default is inet (IPv4).

+

With inet6fb4 the client behaves as before, that is, + tries to use IPv6, and only if that does not work it + uses IPv4).

+

Default is inet (IPv4).

{timeout, Timeout} -

Timeout = non_neg_integer()

-

Connection timeout.

-

Default is 60000 (milliseconds).

+

Timeout = non_neg_integer()

+

Connection time-out.

+

Default is 60000 (milliseconds).

{dtimeout, DTimeout}

DTimeout = non_neg_integer() | infinity

-

Data Connect timeout. - The time the client will wait for the server to connect to the - data socket.

-

Default is infinity.

+

Data connect time-out. + The time the client waits for the server to connect to the + data socket.

+

Default is infinity.

{progress, Progress}

Progress = ignore | {CBModule, CBFunction, InitProgress}

-

CBModule = atom(), CBFunction = atom()

-

InitProgress = term()

-

Default is ignore.

+

CBModule = atom(), CBFunction = atom()

+

InitProgress = term()

+

Default is ignore.

-

The progress option is intended to be used by applications that - want to create some type of progress report such as a progress bar in - a GUI. The default value for the progress option is ignore - e.i. the option is not used. When the progress option is - specified the following will happen when ftp:send/[3,4] or - ftp:recv/[3,4] are called.

+

Option progress is intended to be used by applications that + want to create some type of progress report, such as a progress bar in + a GUI. Default for the progress option is ignore, + that is, the option is not used. When the progress option is + specified, the following happens when ftp:send/[3,4] or + ftp:recv/[3,4] are called:

-

Before a file is transfered the following call will - be made to indicate the start of the file transfer and how big +

Before a file is transferred, the following call is + made to indicate the start of the file transfer and how large the file is. The return value of the callback function - should be a new value for the UserProgressTerm that will - bu used as input next time the callback function is + is to be a new value for the UserProgressTerm that will + be used as input the next time the callback function is called.

-

CBModule:CBFunction(InitProgress, File, {file_size, FileSize})

-

-

Every time a chunk of bytes is transfered the - following call will be made:

-

+

Every time a chunk of bytes is transferred the + following call is made:

- CBModule:CBFunction(UserProgressTerm, File, {transfer_size, TransferSize})

-

+ CBModule:CBFunction(UserProgressTerm, File, {transfer_size, TransferSize}) +

-

At the end of the file the following call will be - made to indicate the end of the transfer.

-

+

At the end of the file the following call is + made to indicate the end of the transfer:

- CBModule:CBFunction(UserProgressTerm, File, {transfer_size, 0})

-

+ CBModule:CBFunction(UserProgressTerm, File, {transfer_size, 0}) +

-

The callback function should be defined as

+

The callback function is to be defined as follows:

- CBModule:CBFunction(UserProgressTerm, File, Size) -> UserProgressTerm

+ CBModule:CBFunction(UserProgressTerm, File, Size) -> UserProgressTerm +

CBModule = CBFunction = atom() @@ -227,50 +223,51 @@

- Size = {transfer_size, integer()} | {file_size, integer()} | {file_size, unknown}

+ Size = {transfer_size, integer()} | {file_size, integer()} | {file_size, unknown} +

-

Alas for remote files it is not possible for ftp to determine the +

For remote files, ftp cannot determine the file size in a platform independent way. In this case the size - will be unknown and it is left to the application to find - out the size.

+ becomes unknown and it is left to the application to + determine the size.

The callback is made by a middleman process, hence the - file transfer will not be affected by the code in the progress - callback function. If the callback should crash this will be - detected by the ftp connection process that will print an - info-report and then go one as if the progress option was set - to ignore.

+ file transfer is not affected by the code in the progress + callback function. If the callback crashes, this is + detected by the FTP connection process, which then prints an + info-report and goes on as if the progress option was set + to ignore.

The file transfer type is set to the default of the FTP server - when the session is opened. This is usually ASCCI-mode. + when the session is opened. This is usually ASCCI mode.

-

The current local working directory (cf. lpwd/1) is set to - the value reported by file:get_cwd/1. the wanted +

The current local working directory (compare lpwd/1) is set + to the value reported by file:get_cwd/1, the wanted local directory.

The return value Pid is used as a reference to the - newly created ftp client in all other functions, and they should - be called by the process that created the connection. The ftp + newly created FTP client in all other functions, and they are to + be called by the process that created the connection. The FTP client process monitors the process that created it and - will terminate if that process terminates.

+ terminates if that process terminates.

- COMMON DATA TYPES -

Here follows type definitions that are used by more than one - function in the FTP client API.

-

pid() - identifier of an ftp connection.

-

string() = list of ASCII characters.

-

shortage_reason() = etnospc | epnospc

-

restriction_reason() = epath | efnamena | elogin | enotbinary - - note not all restrictions may always relevant to all functions -

-

common_reason() = econn | eclosed | term() - some kind of - explanation of what went wrong.

+ DATA TYPES +

The following type definitions are used by more than one + function in the FTP client API:

+

pid() = identifier of an FTP connection

+

string() = list of ASCII characters

+

shortage_reason() = etnospc | epnospc

+

restriction_reason() = epath | efnamena | elogin | enotbinary + - all restrictions are not always relevant to all functions +

+

common_reason() = econn | eclosed | term() + - some explanation of what went wrong

@@ -278,15 +275,14 @@ account(Pid, Account) -> ok | {error, Reason} - Specify which account to use. + Specifies which account to use. Pid = pid() Account = string() Reason = eacct | common_reason() -

If an account is needed for an operation set the account - with this operation.

+

Sets the account for an operation, if needed.

@@ -297,7 +293,8 @@ append(Pid, LocalFile) -> append(Pid, LocalFile, RemoteFile) -> ok | {error, Reason} - Transfer file to remote server, and append it to Remotefile. + Transfers a file to remote server, and appends it to + Remotefile. Pid = pid() LocalFile = RemoteFile = string() @@ -306,9 +303,9 @@

Transfers the file LocalFile to the remote server. If RemoteFile is specified, the name of the remote file that the - file will be appended to is set to RemoteFile; otherwise - the name is set to LocalFile If the file does not exists the - file will be created.

+ file is appended to is set to RemoteFile, otherwise + to LocalFile. If the file does not exists, + it is created.

@@ -316,17 +313,17 @@ append_bin(Pid, Bin, RemoteFile) -> ok | {error, Reason} - Transfer a binary into a remote file. + Transfers a binary into a remote file. Pid = pid() Bin = binary()() RemoteFile = string() - Reason = restriction_reason()| shortage_reason() | common_reason() + Reason = restriction_reason()| shortage_reason() | common_reason() -

Transfers the binary Bin to the remote server and append - it to the file RemoteFile. If the file does not exists it - will be created.

+

Transfers the binary Bin to the remote server and appends + it to the file RemoteFile. If the file does not exist, it + is created.

@@ -334,18 +331,18 @@ append_chunk(Pid, Bin) -> ok | {error, Reason} - append a chunk to the remote file. + Appends a chunk to the remote file. Pid = pid() Bin = binary() Reason = echunk | restriction_reason() | common_reason() -

Transfer the chunk Bin to the remote server, which - append it into the file specified in the call to - append_chunk_start/2.

-

Note that for some errors, e.g. file system full, it is - necessary to to call append_chunk_end to get the +

Transfers the chunk Bin to the remote server, which + appends it to the file specified in the call to + append_chunk_start/2.

+

For some errors, for example, file system full, it is + necessary to call append_chunk_end to get the proper reason.

@@ -354,16 +351,16 @@ append_chunk_start(Pid, File) -> ok | {error, Reason} - Start transfer of file chunks for appending to File. + Starts transfer of file chunks for appending to File. Pid = pid() File = string() Reason = restriction_reason() | common_reason() -

Start the transfer of chunks for appending to the file - File at the remote server. If the file does not exists - it will be created.

+

Starts the transfer of chunks for appending to the file + File at the remote server. If the file does not exist, + it is created.

@@ -371,7 +368,7 @@ append_chunk_end(Pid) -> ok | {error, Reason} - Stop transfer of chunks for appending. + Stops transfer of chunks for appending. Pid = pid() Reason = echunk | restriction_reason() | shortage_reason() @@ -379,7 +376,7 @@

Stops transfer of chunks for appending to the remote server. The file at the remote server, specified in the call to - append_chunk_start/2 is closed by the server.

+ append_chunk_start/2, is closed by the server.

@@ -387,7 +384,7 @@ cd(Pid, Dir) -> ok | {error, Reason} - Change remote working directory. + Changes remote working directory. Pid = pid() Dir = string() @@ -403,13 +400,13 @@ close(Pid) -> ok - End the ftp session. + Ends the FTP session. Pid = pid() -

Ends an ftp session, created using the - open function.

+

Ends an FTP session, created using function + open.

@@ -417,7 +414,7 @@ delete(Pid, File) -> ok | {error, Reason} - Delete a file at the remote server.. + Deletes a file at the remote server. Pid = pid() File = string() @@ -432,7 +429,7 @@ formaterror(Tag) -> string() - Return error diagnostics. + Returns error diagnostics. Tag = {error, atom()} | atom() @@ -446,14 +443,14 @@ lcd(Pid, Dir) -> ok | {error, Reason} - Change local working directory. + Changes local working directory. Pid = pid() Dir = string() Reason = restriction_reason() -

Changes the working directory to Dir for the local client.

+

Changes the working directory to Dir for the local client.

@@ -461,7 +458,7 @@ lpwd(Pid) -> {ok, Dir} - Get local current working directory. + Gets local current working directory. Pid = pid() @@ -485,13 +482,13 @@ Reason = restriction_reason() | common_reason()
-

Returns a list of files in long format.

-

Pathname can be a directory, a group of files or - even a file. The Pathname string can contain wildcard(s).

-

ls/1 implies the user's current remote directory.

-

The format of Listing is operating system dependent - (on UNIX it is typically produced from the output of the - ls -l shell command).

+

Returns a list of files in long format.

+

Pathname can be a directory, a group of files, or + a file. The Pathname string can contain wildcards.

+

ls/1 implies the current remote directory of the user.

+

The format of Listing depends on the operating system. + On UNIX, it is typically produced from the output of the + ls -l shell command.

@@ -499,7 +496,7 @@ mkdir(Pid, Dir) -> ok | {error, Reason} - Create remote directory. + Creates a remote directory. Pid = pid() Dir = string() @@ -525,15 +522,15 @@ Reason = restriction_reason() | common_reason() -

Returns a list of files in short format.

-

Pathname can be a directory, a group of files or - even a file. The Pathname string can contain wildcard(s).

-

nlist/1 implies the user's current remote directory.

+

Returns a list of files in short format.

+

Pathname can be a directory, a group of files, or + a file. The Pathname string can contain wildcards.

+

nlist/1 implies the current remote directory of the user.

The format of Listing is a stream of - file names, where each name is separated by <CRLF> or - <NL>. Contrary to the ls function, the purpose of - nlist is to make it possible for a program to - automatically process file name information.

+ filenames where each filename is separated by <CRLF> or + <NL>. Contrary to function ls, the purpose of + nlist is to enable a program to + process filename information automatically.

@@ -542,23 +539,23 @@ open(Host) -> {ok, Pid} | {error, Reason} open(Host, Opts) -> {ok, Pid} | {error, Reason} - Start an standalone ftp client. + Starts a standalone FTP client. Host = string() | ip_address() 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) + verbose() = boolean() (default is false) + debug() = disable | debug | trace (default is disable) open_option() = {ipfamily, ipfamily()} | {port, port()} | {mode, mode()} | {tls, tls_options()} | {timeout, timeout()} | {dtimeout, dtimeout()} | {progress, progress()} - ipfamily() = inet | inet6 | inet6fb4 (defaults to inet) - port() = integer() > 0 (defaults to 21) - mode() = active | passive (defaults to passive) + ipfamily() = inet | inet6 | inet6fb4 (default is inet) + port() = integer() > 0 (default is 21) + mode() = active | passive (default is passive) tls_options() = [ssl:ssloption()] - timeout() = integer() > 0 (defaults to 60000 milliseconds) - dtimeout() = integer() > 0 | infinity (defaults to infinity) - pogress() = ignore | {module(), function(), initial_data()} (defaults to ignore) + timeout() = integer() > 0 (default is 60000 milliseconds) + dtimeout() = integer() > 0 | infinity (default is infinity) + pogress() = ignore | {module(), function(), initial_data()} (default is ignore) module() = atom() function() = atom() initial_data() = term() @@ -566,16 +563,20 @@ -

This function is used to start a standalone ftp client process - (without the inets service framework) and - open a session with the FTP server at Host.

+

Starts a standalone FTP client process + (without the Inets service framework) and + opens a session with the FTP server at Host.

-

If the option {tls, tls_options()} is present, the ftp session will be transported over tls (ftps, see -RFC 4217). The list tls_options() may be empty. The function ssl:connect/3 is used for securing both the control connection and the data sessions. +

If option {tls, tls_options()} is present, the FTP session + is transported over tls (ftps, see + RFC 4217). + The list tls_options() can be empty. The function + ssl:connect/3 + is used for securing both the control connection and the data sessions.

-

A session opened in this way, is closed using the - close function.

+

A session opened in this way is closed using function + close.

@@ -583,22 +584,10 @@ pwd(Pid) -> {ok, Dir} | {error, Reason} - Get remote current working directory. - - Pid = pid() - Reason = restriction_reason() | common_reason() - - -

Returns the current working directory at the remote server.

-
-
- - - pwd(Pid) -> {ok, Dir} | {error, Reason} - Get remote current working directory. + Gets the remote current working directory. Pid = pid() - Reason = restriction_reason() | common_reason() + Reason = restriction_reason() | common_reason()

Returns the current working directory at the remote server.

@@ -612,7 +601,7 @@ recv(Pid, RemoteFile) -> recv(Pid, RemoteFile, LocalFile) -> ok | {error, Reason} - Transfer file from remote server. + Transfers a file from remote server. Pid = pid() RemoteFile = LocalFile = string() @@ -620,14 +609,14 @@ file_write_error_reason() = see file:write/2 -

Transfer the file RemoteFile from the remote server - to the the file system of the local client. If +

Transfers the file RemoteFile from the remote server + to the file system of the local client. If LocalFile is specified, the local file will be - LocalFile; otherwise it will be + LocalFile, otherwise RemoteFile.

-

If the file write fails - (e.g. enospc), then the command is aborted and {error, file_write_error_reason()} is returned. The file is - however not removed.

+

If the file write fails (for example, enospc), the command is + aborted and {error, file_write_error_reason()} is returned. + However, the file is not removed.

@@ -635,7 +624,7 @@ recv_bin(Pid, RemoteFile) -> {ok, Bin} | {error, Reason} - Transfer file from remote server as a binary. + Transfers a file from remote server as a binary. Pid = pid() Bin = binary() @@ -652,14 +641,14 @@ recv_chunk_start(Pid, RemoteFile) -> ok | {error, Reason} - Start chunk-reading of the remote file. + Starts chunk-reading of the remote file. Pid = pid() RemoteFile = string() Reason = restriction_reason() | common_reason() -

Start transfer of the file RemoteFile from the +

Starts transfer of the file RemoteFile from the remote server.

@@ -668,20 +657,20 @@ recv_chunk(Pid) -> ok | {ok, Bin} | {error, Reason} - Receive a chunk of the remote file. + Receives a chunk of the remote file. Pid = pid() Bin = binary() Reason = restriction_reason() | common_reason() -

Receive a chunk of the remote file (RemoteFile of - recv_chunk_start). The return values has the following +

Receives a chunk of the remote file (RemoteFile of + recv_chunk_start). The return values have the following meaning:

- ok the transfer is complete. - {ok, Bin} just another chunk of the file. - {error, Reason} transfer failed. + ok = the transfer is complete. + {ok, Bin} = just another chunk of the file. + {error, Reason} = transfer failed. @@ -690,7 +679,7 @@ rename(Pid, Old, New) -> ok | {error, Reason} - Rename a file at the remote server.. + Renames a file at the remote server. Pid = pid() CurrFile = NewFile = string() @@ -705,7 +694,7 @@ rmdir(Pid, Dir) -> ok | {error, Reason} - Remove a remote directory. + Removes a remote directory. Pid = pid() Dir = string() @@ -723,7 +712,7 @@ send(Pid, LocalFile) -> send(Pid, LocalFile, RemoteFile) -> ok | {error, Reason} - Transfer file to remote server. + Transfers a file to the remote server. Pid = pid() LocalFile = RemoteFile = string() @@ -732,7 +721,7 @@

Transfers the file LocalFile to the remote server. If RemoteFile is specified, the name of the remote file is set - to RemoteFile; otherwise the name is set to LocalFile.

+ to RemoteFile, otherwise to LocalFile.

@@ -740,7 +729,7 @@ send_bin(Pid, Bin, RemoteFile) -> ok | {error, Reason} - Transfer a binary into a remote file. + Transfers a binary into a remote file. Pid = pid() Bin = binary()() @@ -757,17 +746,17 @@ send_chunk(Pid, Bin) -> ok | {error, Reason} - Write a chunk to the remote file. + Writes a chunk to the remote file. Pid = pid() Bin = binary() Reason = echunk | restriction_reason() | common_reason() -

Transfer the chunk Bin to the remote server, which +

Transfers the chunk Bin to the remote server, which writes it into the file specified in the call to - send_chunk_start/2.

-

Note that for some errors, e.g. file system full, it is + send_chunk_start/2.

+

For some errors, for example, file system full, it is necessary to to call send_chunk_end to get the proper reason.

@@ -777,14 +766,14 @@ send_chunk_start(Pid, File) -> ok | {error, Reason} - Start transfer of file chunks. + Starts transfer of file chunks. Pid = pid() File = string() Reason = restriction_reason() | common_reason() -

Start transfer of chunks into the file File at the +

Starts transfer of chunks into the file File at the remote server.

@@ -793,7 +782,7 @@ send_chunk_end(Pid) -> ok | {error, Reason} - Stop transfer of chunks. + Stops transfer of chunks. Pid = pid() Reason = restriction_reason() | common_reason() | shortage_reason() @@ -809,7 +798,7 @@ type(Pid, Type) -> ok | {error, Reason} - Set transfer type to asciior binary. + Sets transfer type to asciior binary. Pid = pid() Type = ascii | binary @@ -817,8 +806,8 @@

Sets the file transfer type to ascii or binary. When - an ftp session is opened, the default transfer type of the - server is used, most often ascii, which is the default + an FTP session is opened, the default transfer type of the + server is used, most often ascii, which is default according to RFC 959.

@@ -857,21 +846,22 @@ quote(Pid, Command) -> [FTPLine] - Sends an arbitrary FTP command. + Sends an arbitrary FTP command. Pid = pid() Command = string() - 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 - of the lines sent back by the FTP server. This functions is - intended to give an application accesses to FTP commands - that are server specific or that may not be provided by - this FTP client.

+ FTPLine = string( +
+

The telnet end of line characters, from the FTP + protocol definition, CRLF, for example, "\\r\\n" has been removed.

+

Sends an arbitrary FTP command and returns verbatim a list + of the lines sent back by the FTP server. This function is + intended to give application accesses to FTP commands + that are server-specific or that cannot be provided by + this FTP client.

-

FTP commands that require a data connection can not be - successfully issued with this function.

+

FTP commands requiring a data connection cannot be + successfully issued with this function.

@@ -885,30 +875,31 @@ echunk -

Synchronisation error during chunk sending. -

-

A call has been made to send_chunk/2 or - send_chunk_end/1, before a call to - send_chunk_start/2; or a call has been made to another - transfer function during chunk sending, i.e. before a call - to send_chunk_end/1.

+

Synchronization error during chunk sending according to one + of the following: +

+ >A call is made to send_chunk/2 or send_chunk_end/1 + before a call to send_chunk_start/2. + A call has been made to another transfer function during chunk + sending, that is, before a call to send_chunk_end/1. +
eclosed -

The session has been closed.

+

The session is closed.

econn -

Connection to remote server prematurely closed.

+

Connection to the remote server is prematurely closed.

ehost -

Host not found, FTP server not found, or connection rejected +

Host is not found, FTP server is not found, or connection is rejected by FTP server.

elogin -

User not logged in.

+

User is not logged in.

enotbinary @@ -925,7 +916,7 @@ euser -

User name or password not valid.

+

Invalid username or password.

etnospc @@ -938,7 +929,7 @@ efnamena -

File name not allowed [553].

+

Filename not allowed [553].

diff --git a/lib/inets/doc/src/http_uri.xml b/lib/inets/doc/src/http_uri.xml index c71bfbd686..47c40da96a 100644 --- a/lib/inets/doc/src/http_uri.xml +++ b/lib/inets/doc/src/http_uri.xml @@ -35,38 +35,45 @@

This module provides utility functions for working with URIs, - according to RFC 3986.

- + according to + RFC 3986.

- COMMON DATA TYPES + DATA TYPES

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

- +

boolean() = true | false

+

string() = list of ASCII characters

- URI DATA TYPES + URI DATA TYPES

Type definitions that are related to URI:

-

For more information about URI, see RFC 3986.

- - - + + + uri() = string() +

Syntax according to the URI definition in RFC 3986, + for example, "http://www.erlang.org/"

+ user_info() = string() +

+ scheme() = atom() +

Example: http, https

+ host() = string() +

+ port() = pos_integer() +

+ path() = string() +

Represents a file path or directory path

+ query() = string() +

+ fragment() = string() +

+
+ +

For more information about URI, see + RFC 3986.

@@ -74,28 +81,28 @@ fragment() = string() decode(HexEncodedURI) -> URI - Decode a hex encoded URI + Decodes a hexadecimal encoded URI. - HexEncodedURI = string() - A possibly hex encoded uri + HexEncodedURI = string() - A possibly hexadecimal encoded URI URI = uri() -

Decode a possibly hex encoded URI.

+

Decodes a possibly hexadecimal encoded URI.

encode(URI) -> HexEncodedURI - Hex encode an URI + Encodes a hexadecimal encoded URI. URI = uri() - HexEncodedURI = string() - Hex encoded uri + HexEncodedURI = string() - Hexadecimal encoded URI -

Hex encode an URI.

+

Encodes a hexadecimal encoded URI.

@@ -104,10 +111,10 @@ fragment() = string() parse(URI) -> {ok, Result} | {error, Reason} parse(URI, Options) -> {ok, Result} | {error, Reason} - Parse an URI + Parses a URI. - URI = uri() - Options = [Option] + URI = uri() + Options = [Option] Option = {ipv6_host_with_brackets, boolean()} | {scheme_defaults, scheme_defaults()} | {fragment, boolean()}] @@ -119,20 +126,20 @@ fragment() = string() Path = path() Query = query() Fragment = fragment() - Reason = term() + Reason = term() -

This function is used to parse an URI. If no scheme defaults - are provided, the value of +

Parses a URI. If no scheme defaults + are provided, the value of the scheme_defaults - function will be used.

+ function is used.

-

Note that when parsing an URI with an unknown scheme (that is, - a scheme not found in the scheme defaults) a port number must be - provided or else the parsing will fail.

+

When parsing a URI with an unknown scheme (that is, + a scheme not found in the scheme defaults), a port number must be + provided, otherwise the parsing fails.

-

If the fragment option is true, the URI fragment will be returned as - part of the parsing result, otherwise it is completely ignored.

+

If the fragment option is true, the URI fragment is returned as + part of the parsing result, otherwise it is ignored.

@@ -140,14 +147,14 @@ fragment() = string() scheme_defaults() -> SchemeDefaults - A list of scheme and their default ports + A list of the scheme and their default ports. SchemeDefaults = [{scheme(), default_scheme_port_number()}] default_scheme_port_number() = pos_integer() -

This function provides a list of the scheme and their default - port numbers currently supported (by default) by this utility.

+

Provides a list of the scheme and their default + port numbers supported (by default) by this utility.

@@ -160,7 +167,8 @@ fragment() = string() hexlist_to_integer(HexString) -> Number @@ -165,8 +121,6 @@

hexlist_to_integer converts the hexadecimal value of HexString to an integer.

- -
@@ -178,11 +132,8 @@ HexString = string()
-

integer_to_hexlist/1 returns a string representing Number in a hexadecimal form.

- -
@@ -205,8 +156,6 @@ returned. lookup/2 returns undefined and lookup/3 returns Undefined if no Value is found.

- -
@@ -221,14 +170,11 @@ Undefined = term()
-

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

- -
@@ -244,7 +190,6 @@ Undefined = term()
-

lookup_mime_default returns the MIME type associated with a specific file suffix as specified in the mime.types file (located in the @@ -252,8 +197,6 @@ config directory). If no appropriate association is found, the value of DefaultType is returned.

- -
@@ -267,7 +210,6 @@ Message = string()
-

message/3 returns an informative HTTP 1.1 status string in HTML. Each StatusCode requires a specific PhraseArgs: @@ -290,8 +232,6 @@

string(): A string describing why the service was unavailable.

- -
@@ -303,12 +243,9 @@ Month = string()
-

month/1 converts the month NthMonth as an integer (1-12) to an abbreviated string, that is:

1 = "Jan", 2 = "Feb", ..., 12 = "Dec".

- -
@@ -324,8 +261,6 @@

multi_lookup extracts all {Key,Value} tuples from an ETSTable and returns all Values associated with Key in a list.

- -
@@ -341,7 +276,6 @@ HTTP 1.1 StatusCode, for example, 200 is "OK" and 201 is "Created". For more information, see RFC 2616.

- @@ -354,12 +288,9 @@ RFC1123Date = string() -

rfc1123_date/0 returns the current date in RFC 1123 format. rfc_date/1 converts the date in the Erlang format to the RFC 1123 date format.

- -
@@ -373,14 +304,11 @@ N = integer -

split/3 splits String in N chunks using RegExp. split/3 is equivalent to regexp:split/2 with the exception that N defines the maximum number of fields in FieldList.

- -
@@ -394,13 +322,10 @@ Path = QueryString = PathInfo = string() -

split_script_path/1 is equivalent to split_path/1 with one exception. If the longest possible path is not a regular, accessible, and executable file, then not_a_script is returned.

- -
@@ -412,7 +337,6 @@ RequestLine = Path = QueryStringOrPathInfo = string() -

split_path/1 splits RequestLine in a file reference (Path), and a QueryString or a PathInfo string as specified in @@ -428,8 +352,6 @@ Path, isolated with a /, is regarded as PathInfo. The resulting Path is decoded using decode_hex/1 before delivery.

- -
@@ -441,12 +363,9 @@ String = Stripped = string() -

strip/1 removes any leading or trailing linear white space from the string. Linear white space is to be read as horizontal tab or space.

- -
@@ -457,7 +376,6 @@ FileName = Suffix = string() -

suffix/1 is equivalent to filename:extension/1 with the exception that Suffix is returned without a leading dot (.).

@@ -466,7 +384,6 @@
- SEE ALSO

httpd(3)

diff --git a/lib/inets/doc/src/inets.xml b/lib/inets/doc/src/inets.xml index 2bb5427465..5d071c9a48 100644 --- a/lib/inets/doc/src/inets.xml +++ b/lib/inets/doc/src/inets.xml @@ -119,17 +119,6 @@ - - stop() -> ok - Stops the Inets application. - -

Stops the Inets application. See also - application(3).

- - -
-
- start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason} start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason} @@ -166,6 +155,17 @@ + + stop() -> ok + Stops the Inets application. + +

Stops the Inets application. See also + application(3).

+ + +
+
+ stop(Service, Reference) -> ok | {error, Reason} Stops a started service of the Inets application or takes diff --git a/lib/inets/doc/src/mod_auth.xml b/lib/inets/doc/src/mod_auth.xml index 8bef025be8..2da2be37ed 100644 --- a/lib/inets/doc/src/mod_auth.xml +++ b/lib/inets/doc/src/mod_auth.xml @@ -34,11 +34,36 @@

This module provides for basic user authentication using textual files, Dets databases, or Mnesia databases.

- -
+ + add_group_member(GroupName, UserName, Options) -> true | {error, Reason} + add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason} + add_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason} + Adds a user to a group. + + GroupName = string() + UserName = string() + Options = [Option] + Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} + Port = integer() + Address = {A,B,C,D} | string() | undefined + Dir = string() + AuthPassword = string() + Reason = term() + + +

add_group_member/3, add_group_member/4, and + add_group_member/5 each + adds a user to a group. If the group does not exist, it + is created and the user is added to the group. Upon successful + operation, this function returns true. + When add_group_members/3 + is called, options Port and Dir are mandatory.

+
+
+ add_user(UserName, Options) -> true| {error, Reason} add_user(UserName, Password, UserData, Port, Dir) -> true | {error, Reason} @@ -57,53 +82,45 @@ Reason = term() - -

add_user/2, add_user/5, and add_user/6 each adds a user to the user database. If the operation is successful, this function returns true. If an error occurs, {error,Reason} is returned. When add_user/2 is called, options Password, UserData, Port, and Dir are mandatory.

- -
- - delete_user(UserName,Options) -> true | {error, Reason} - delete_user(UserName, Port, Dir) -> true | {error, Reason} - delete_user(UserName, Address, Port, Dir) -> true | {error, Reason} - Deletes a user from the user database. + + delete_group(GroupName, Options) -> true | {error,Reason} <name>delete_group(GroupName, Port, Dir) -> true | {error, Reason} + delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason} + Deletes a group. - UserName = string() Options = [Option] Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} Port = integer() Address = {A,B,C,D} | string() | undefined Dir = string() + GroupName = string() AuthPassword = string() Reason = term() - -

delete_user/2, delete_user/3, and delete_user/4 - each deletes a user from the user database. - If the operation is successful, this function returns true. - If an error occurs, {error,Reason} is returned. - When delete_user/2 is called, options Port and Dir - are mandatory.

- - +

delete_group/2, delete_group/3, and delete_group/4 + each deletes the group specified and returns true. + If there is an error, {error, Reason} is returned. + When delete_group/2 is called, option + Port and Dir are mandatory.

- - get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason} - get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason} - get_user(UserName, Address, Port, Dir) -> {ok, #httpd_user} | {error, Reason} - Returns a user from the user database. + + delete_group_member(GroupName, UserName, Options) -> true | {error, Reason} + delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason} + delete_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason} + Removes a user from a group. + GroupName = string() UserName = string() Options = [Option] Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} @@ -114,51 +131,46 @@ Reason = term() - -

get_user/2, get_user/3, and get_user/4 each - returns an httpd_user record containing the userdata for a - specific user. If the user cannot be found, {error, Reason} - is returned. When get_user/2 is called, options Port and Dir - are mandatory.

- - +

delete_group_member/3, delete_group_member/4, and + delete_group_member/5 each deletes a user from a group. + If the group or the user does not exist, + this function returns an error, otherwise true. + When delete_group_member/3 is called, the options Port + and Dir are mandatory.

- + - list_users(Options) -> {ok, Users} | {error, Reason} - list_users(Port, Dir) -> {ok, Users} | {error, Reason} - list_users(Address, Port, Dir) -> {ok, Users} | {error, Reason} - Lists users in the user database. + delete_user(UserName,Options) -> true | {error, Reason} + delete_user(UserName, Port, Dir) -> true | {error, Reason} + delete_user(UserName, Address, Port, Dir) -> true | {error, Reason} + Deletes a user from the user database. + UserName = string() Options = [Option] Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} Port = integer() Address = {A,B,C,D} | string() | undefined Dir = string() - Users = list() AuthPassword = string() - Reason = atom() + Reason = term() - -

list_users/1, list_users/2, and list_users/3 - each returns a list - of users in the user database for a specific Port/Dir. - When list_users/1 is called, options Port and Dir +

delete_user/2, delete_user/3, and delete_user/4 + each deletes a user from the user database. + If the operation is successful, this function returns true. + If an error occurs, {error,Reason} is returned. + When delete_user/2 is called, options Port and Dir are mandatory.

- -
- add_group_member(GroupName, UserName, Options) -> true | {error, Reason} - add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason} - add_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason} - Adds a user to a group. + get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason} + get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason} + get_user(UserName, Address, Port, Dir) -> {ok, #httpd_user} | {error, Reason} + Returns a user from the user database. - GroupName = string() UserName = string() Options = [Option] Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} @@ -169,48 +181,38 @@ Reason = term() - -

add_group_member/3, add_group_member/4, and - add_group_member/5 each - adds a user to a group. If the group does not exist, it - is created and the user is added to the group. Upon successful - operation, this function returns true. - When add_group_members/3 - is called, options Port and Dir are mandatory.

- - +

get_user/2, get_user/3, and get_user/4 each + returns an httpd_user record containing the userdata for a + specific user. If the user cannot be found, {error, Reason} + is returned. When get_user/2 is called, options Port and Dir + are mandatory.

- - delete_group_member(GroupName, UserName, Options) -> true | {error, Reason} - delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason} - delete_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason} - Removes a user from a group. + + list_groups(Options) -> {ok, Groups} | {error, Reason} + list_groups(Port, Dir) -> {ok, Groups} | {error, Reason} + list_groups(Address, Port, Dir) -> {ok, Groups} | {error, Reason} + Lists all the groups. - GroupName = string() - UserName = string() Options = [Option] Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} Port = integer() Address = {A,B,C,D} | string() | undefined Dir = string() + Groups = list() AuthPassword = string() Reason = term() - -

delete_group_member/3, delete_group_member/4, and - delete_group_member/5 each deletes a user from a group. - If the group or the user does not exist, - this function returns an error, otherwise true. - When delete_group_member/3 is called, the options Port +

list_groups/1, list_groups/2, and list_groups/3 + each lists all the groups available. + If there is an error, {error, Reason} is returned. + When list_groups/1 is called, options Port and Dir are mandatory.

- -
- + list_group_members(GroupName, Options) -> {ok, Users} | {error, Reason} list_group_members(GroupName, Port, Dir) -> {ok, Users} | {error, Reason} @@ -228,71 +230,39 @@ Reason = term() -

list_group_members/2, list_group_members/3, and list_group_members/4 each lists the members of a specified group. If the group does not exist or there is an error, {error, Reason} is returned. When list_group_members/2 is called, options Port and Dir are mandatory.

- - -
-
- - - list_groups(Options) -> {ok, Groups} | {error, Reason} - list_groups(Port, Dir) -> {ok, Groups} | {error, Reason} - list_groups(Address, Port, Dir) -> {ok, Groups} | {error, Reason} - Lists all the groups. - - Options = [Option] - Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} - Port = integer() - Address = {A,B,C,D} | string() | undefined - Dir = string() - Groups = list() - AuthPassword = string() - Reason = term() - - - -

list_groups/1, list_groups/2, and list_groups/3 - each lists all the groups available. - If there is an error, {error, Reason} is returned. - When list_groups/1 is called, options Port - and Dir are mandatory.

- -
- - delete_group(GroupName, Options) -> true | {error,Reason} <name>delete_group(GroupName, Port, Dir) -> true | {error, Reason} - delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason} - Deletes a group. + + list_users(Options) -> {ok, Users} | {error, Reason} + list_users(Port, Dir) -> {ok, Users} | {error, Reason} + list_users(Address, Port, Dir) -> {ok, Users} | {error, Reason} + Lists users in the user database. Options = [Option] Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword} Port = integer() Address = {A,B,C,D} | string() | undefined Dir = string() - GroupName = string() + Users = list() AuthPassword = string() - Reason = term() + Reason = atom() - -

delete_group/2, delete_group/3, and delete_group/4 - each deletes the group specified and returns true. - If there is an error, {error, Reason} is returned. - When delete_group/2 is called, option - Port and Dir are mandatory.

- - +

list_users/1, list_users/2, and list_users/3 + each returns a list + of users in the user database for a specific Port/Dir. + When list_users/1 is called, options Port and Dir + are mandatory.

- + update_password(Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason} update_password(Address,Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason} @@ -307,7 +277,6 @@ Reason = term() -

update_password/5 and update_password/6 each updates AuthAccessPassword for the specified directory. If NewPassword is equal to "NoPassword", no password is required to @@ -319,7 +288,6 @@

- SEE ALSO

httpd(3), mod_alias(3)

diff --git a/lib/inets/doc/src/mod_security.xml b/lib/inets/doc/src/mod_security.xml index 7aae98e1cf..9dc32b971b 100644 --- a/lib/inets/doc/src/mod_security.xml +++ b/lib/inets/doc/src/mod_security.xml @@ -35,6 +35,26 @@

Security Audit and Trailing Functionality

+ + + block_user(User, Port, Dir, Seconds) -> true | {error, Reason} + block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason} + Blocks a user from access to a directory for a certain amount of time. + + User = string() + Port = integer() + Address = {A,B,C,D} | string() | undefined + Dir = string() + Seconds = integer() | infinity + Reason = no_such_directory + + +

block_user/4 and block_user/5 each blocks the user + User from directory Dir for a specified + amount of time.

+
+
+ list_auth_users(Port) -> Users | [] list_auth_users(Address, Port) -> Users | [] @@ -50,7 +70,6 @@ Users = list() = [string()] -

list_auth_users/1, list_auth_users/2, and list_auth_users/3 each returns a list of users that are currently authenticated. Authentications are stored for @@ -71,31 +90,12 @@ Users = list() = [string()] -

list_blocked_users/1, list_blocked_users/2, and list_blocked_users/3 each returns a list of users that are currently blocked from access.

- - block_user(User, Port, Dir, Seconds) -> true | {error, Reason} - block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason} - Blocks a user from access to a directory for a certain amount of time. - - User = string() - Port = integer() - Address = {A,B,C,D} | string() | undefined - Dir = string() - Seconds = integer() | infinity - Reason = no_such_directory - - - -

block_user/4 and block_user/5 each blocks the user - User from directory Dir for a specified - amount of time.

-
-
+ unblock_user(User, Port) -> true | {error, Reason} unblock_user(User, Address, Port) -> true | {error, Reason} @@ -110,7 +110,6 @@ Reason = term() -

unblock_user/2, unblock_user/3, and unblock_user/4 each removes the user User from the list of blocked users for Port (and Dir).

@@ -123,16 +122,15 @@ SecurityCallbackModule

The SecurityCallbackModule is a user-written module that can receive events from the mod_security Erlang web server API module. - This module only exports the functions - event/4,5, + This module only exports the functions event/[4,5] which are described here.

- event(What, Port, Dir, Data) -> ignored - event(What, Address, Port, Dir, Data) -> ignored + Module:event(What, Port, Dir, Data) -> ignored + Module:event(What, Address, Port, Dir, Data) -> ignored Called whenever an event occurs in mod_security. What = atom() diff --git a/lib/inets/doc/src/tftp.xml b/lib/inets/doc/src/tftp.xml index 78f77f5b91..00d9d53376 100644 --- a/lib/inets/doc/src/tftp.xml +++ b/lib/inets/doc/src/tftp.xml @@ -221,88 +221,57 @@ + - start(Options) -> {ok, Pid} | {error, Reason} - Starts a daemon process. + change_config(daemons, Options) -> [{Pid, Result}] + Changes configuration for all daemons. + Options = [option()] Pid = pid() + Result = ok | {error, Reason} Reason = term() -

Starts a daemon process listening for UDP packets on a - port. When it receives a request for read or write, it spawns - a temporary server process handling the actual transfer - of the (virtual) file.

+

Changes configuration for all TFTP daemon processes.

- +
- read_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason} - Reads a (virtual) file from a TFTP server. + change_config(servers, Options) -> [{Pid, Result}] + Changes configuration for all servers. + - RemoteFilename = string() - LocalFilename = binary | string() Options = [option()] - LastCallbackState = term() + Pid = pid() + Result = ok | {error, Reason} Reason = term() -

Reads a (virtual) file RemoteFilename from a TFTP - server.

-

If LocalFilename is the atom binary, - tftp_binary is used as callback module. It concatenates - all transferred blocks and returns them as one single binary - in LastCallbackState.

-

If LocalFilename is a string and there are no - registered callback modules, tftp_file is used as - callback module. It writes each transferred block to the file - named LocalFilename and returns the number of - transferred bytes in LastCallbackState.

-

If LocalFilename is a string and there are registered - callback modules, LocalFilename is tested against - the regexps of these and the callback module corresponding to - the first match is used, or an error tuple is returned if no - matching regexp is found.

-
+

Changes configuration for all TFTP server processes.

- + +
- write_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason} - Writes a (virtual) file to a TFTP server. + change_config(Pid, Options) -> Result + Changes configuration for a TFTP daemon, server, + or client process. - RemoteFilename = string() - LocalFilename = binary() | string() + Pid = pid() Options = [option()] - LastCallbackState = term() + Result = ok | {error, Reason} Reason = term() -

Writes a (virtual) file RemoteFilename to a TFTP - server.

-

If LocalFilename is a binary, tftp_binary is - used as callback module. The binary is transferred block by - block and the number of transferred bytes is returned in - LastCallbackState.

-

If LocalFilename is a string and there are no - registered callback modules, tftp_file is used as - callback module. It reads the file named LocalFilename - block by block and returns the number of transferred bytes - in LastCallbackState.

-

If LocalFilename is a string and there are registered - callback modules, LocalFilename is tested against - the regexps of these and the callback module corresponding to - the first match is used, or an error tuple is returned if no - matching regexp is found.

- +

Changes configuration for a TFTP daemon, server, or client process.

- + info(daemons) -> [{Pid, Options}] Returns information about all daemons. @@ -342,72 +311,89 @@

Returns information about a TFTP daemon, server, or client process.

- -
- - - change_config(daemons, Options) -> [{Pid, Result}] - Changes configuration for all daemons. - + + + read_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason} + Reads a (virtual) file from a TFTP server. + RemoteFilename = string() + LocalFilename = binary | string() Options = [option()] - Pid = pid() - Result = ok | {error, Reason} + LastCallbackState = term() Reason = term() -

Changes configuration for all TFTP daemon processes.

- - +

Reads a (virtual) file RemoteFilename from a TFTP + server.

+

If LocalFilename is the atom binary, + tftp_binary is used as callback module. It concatenates + all transferred blocks and returns them as one single binary + in LastCallbackState.

+

If LocalFilename is a string and there are no + registered callback modules, tftp_file is used as + callback module. It writes each transferred block to the file + named LocalFilename and returns the number of + transferred bytes in LastCallbackState.

+

If LocalFilename is a string and there are registered + callback modules, LocalFilename is tested against + the regexps of these and the callback module corresponding to + the first match is used, or an error tuple is returned if no + matching regexp is found.

+ +
- + - change_config(servers, Options) -> [{Pid, Result}] - Changes configuration for all servers. - + start(Options) -> {ok, Pid} | {error, Reason} + Starts a daemon process. Options = [option()] Pid = pid() - Result = ok | {error, Reason} Reason = term() -

Changes configuration for all TFTP server processes.

+

Starts a daemon process listening for UDP packets on a + port. When it receives a request for read or write, it spawns + a temporary server process handling the actual transfer + of the (virtual) file.

- +
- change_config(Pid, Options) -> Result - Changes configuration for a TFTP daemon, server, - or client process. + write_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason} + Writes a (virtual) file to a TFTP server. - Pid = pid() + RemoteFilename = string() + LocalFilename = binary() | string() Options = [option()] - Result = ok | {error, Reason} - Reason = term() - - -

Changes configuration for a TFTP daemon, server, or client process.

- - -
-
- - - start() -> ok | {error, Reason} - Starts the Inets application. - + LastCallbackState = term() Reason = term() -

Starts the Inets application.

+

Writes a (virtual) file RemoteFilename to a TFTP + server.

+

If LocalFilename is a binary, tftp_binary is + used as callback module. The binary is transferred block by + block and the number of transferred bytes is returned in + LastCallbackState.

+

If LocalFilename is a string and there are no + registered callback modules, tftp_file is used as + callback module. It reads the file named LocalFilename + block by block and returns the number of transferred bytes + in LastCallbackState.

+

If LocalFilename is a string and there are registered + callback modules, LocalFilename is tested against + the regexps of these and the callback module corresponding to + the first match is used, or an error tuple is returned if no + matching regexp is found.

+
@@ -467,43 +453,32 @@
- - prepare(Peer, Access, Filename, Mode, SuggestedOptions, InitialState) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}} - Prepares to open a file on the client side. + + Module:abort(Code, Text, State) -> ok + Aborts the file transfer. - Peer = {PeerType, PeerHost, PeerPort} - PeerType = inet | inet6 - PeerHost = ip_address() - PeerPort = integer() - Access = read | write - Filename = string() - Mode = string() - SuggestedOptions = AcceptedOptions = [{Key, Value}] -  Key = Value = string() - InitialState = [] | [{root_dir, string()}] - NewState = term() Code = undef | enoent | eacces | enospc   | badop | eexist | baduser | badopt   | int() Text = string() + State = term() -

Prepares to open a file on the client side.

-

No new options can be added, but those present in - SuggestedOptions can be omitted or replaced with new - values in AcceptedOptions.

-

This is followed by a call to open/4 before any - read/write access is performed. AcceptedOptions is - sent to the server, which replies with the options that it - accepts. These are then forwarded to open/4 as - SuggestedOptions.

- - +

Invoked when the file transfer is aborted.

+

The callback function is expected to clean + up its used resources after the aborted file + transfer, such as closing open file + descriptors and so on. The function is not + invoked if any of the other callback + functions returns an error, as it is + expected that they already have cleaned up + the necessary resources. However, it is + invoked if the functions fail (crash).

- - - open(Peer, Access, Filename, Mode, SuggestedOptions, State) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}} + + + Module:open(Peer, Access, Filename, Mode, SuggestedOptions, State) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}} Opens a file for read or write access. Peer = {PeerType, PeerHost, PeerPort} @@ -536,9 +511,44 @@ + + + Module:prepare(Peer, Access, Filename, Mode, SuggestedOptions, InitialState) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}} + Prepares to open a file on the client side. + + Peer = {PeerType, PeerHost, PeerPort} + PeerType = inet | inet6 + PeerHost = ip_address() + PeerPort = integer() + Access = read | write + Filename = string() + Mode = string() + SuggestedOptions = AcceptedOptions = [{Key, Value}] +  Key = Value = string() + InitialState = [] | [{root_dir, string()}] + NewState = term() + Code = undef | enoent | eacces | enospc +   | badop | eexist | baduser | badopt +   | int() + Text = string() + + +

Prepares to open a file on the client side.

+

No new options can be added, but those present in + SuggestedOptions can be omitted or replaced with new + values in AcceptedOptions.

+

This is followed by a call to open/4 before any + read/write access is performed. AcceptedOptions is + sent to the server, which replies with the options that it + accepts. These are then forwarded to open/4 as + SuggestedOptions.

+ + +
+
- read(State) -> {more, Bin, NewState} | {last, Bin, FileSize} | {error, {Code, Text}} + Module:read(State) -> {more, Bin, NewState} | {last, Bin, FileSize} | {error, {Code, Text}} Reads a chunk from the file. State = NewState = term() @@ -565,7 +575,7 @@ - write(Bin, State) -> {more, NewState} | {last, FileSize} | {error, {Code, Text}} + Module:write(Bin, State) -> {more, NewState} | {last, FileSize} | {error, {Code, Text}} Writes a chunk to the file. Bin = binary() @@ -590,30 +600,6 @@ - - - abort(Code, Text, State) -> ok - Aborts the file transfer. - - Code = undef | enoent | eacces | enospc -   | badop | eexist | baduser | badopt -   | int() - Text = string() - State = term() - - -

Invoked when the file transfer is aborted.

-

The callback function is expected to clean - up its used resources after the aborted file - transfer, such as closing open file - descriptors and so on. The function is not - invoked if any of the other callback - functions returns an error, as it is - expected that they already have cleaned up - the necessary resources. However, it is - invoked if the functions fail (crash).

-
-
@@ -628,7 +614,7 @@ - error_msg(Format, Data) -> ok | exit(Reason) + Logger:error_msg(Format, Data) -> ok | exit(Reason) Logs an error message. Format = string() @@ -644,32 +630,32 @@ - warning_msg(Format, Data) -> ok | exit(Reason) - Logs a warning message. + Logger:info_msg(Format, Data) -> ok | exit(Reason) + Logs an info message. Format = string() Data = [term()] Reason = term() -

Logs a warning message. - See error_logger:warning_msg/2 for details.

- - +

Logs an info message. + See error_logger:info_msg/2 for details.

- + - info_msg(Format, Data) -> ok | exit(Reason) - Logs an info message. + Logger:warning_msg(Format, Data) -> ok | exit(Reason) + Logs a warning message. Format = string() Data = [term()] Reason = term() -

Logs an info message. - See error_logger:info_msg/2 for details.

+

Logs a warning message. + See error_logger:warning_msg/2 for details.

+ +
-- cgit v1.2.3 From 8e216b94beeed02e67f08d3bf9307c7c48e3b977 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 2 Sep 2015 12:11:50 +0200 Subject: inets: httpc - Clarify/correct documentation Remove legacy inet6fb4 option from documentation even if the code will still accept it. --- lib/inets/doc/src/httpc.xml | 64 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml index 9a24226e78..31e44f405c 100644 --- a/lib/inets/doc/src/httpc.xml +++ b/lib/inets/doc/src/httpc.xml @@ -49,12 +49,12 @@ be started. When https links need to go through a proxy, the CONNECT method extension to HTTP-1.1 is used to establish a tunnel and then the connection is upgraded to TLS. - However, "TLS upgrade" according to RFC 2817 is not + However, "TLS upgrade" according to RFC 2817is not supported.

Pipelining is only used if the pipeline time-out is set, otherwise persistent connections without - pipelining are used. For example, the client always waits for + pipelining are used. That is, the client always waits for the previous response before sending the next request.

Some examples are provided in the RequestId = request_id() - A unique identifier as returned by request/4 Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used.

Cancels an asynchronous HTTP request. Notice that this does not guarantee @@ -188,7 +188,7 @@

Option ipv6_host_with_bracket deals with how to parse IPv6 addresses. For details, see argument Options of - request/4,5.

+ request/[4,5].

@@ -199,7 +199,7 @@ OptionItems = all | [option_item()] option_item() = proxy | - https_proxy + https_proxy | max_sessions | keep_alive_timeout | max_keep_alive_length | @@ -211,8 +211,8 @@ port | socket_opts | verbose - Profile = profile() | pid( - When started stand_alone. + Profile = profile() | pid() + When started stand_alone only the pid can used. Values = [{option_item(), term()}] Reason = term() @@ -227,7 +227,7 @@ Produces a list of miscellaneous information. Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used.

Produces a list of miscellaneous information. @@ -243,7 +243,7 @@ Resets the cookie database. Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used.

Resets (clears) the cookie database for the specified @@ -262,7 +262,7 @@ {status_code(), Body} | request_id() Body = string() | binary() Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used. Reason = term() @@ -311,7 +311,7 @@ {status_code(), Body} | request_id() Body = string() | binary() Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used. Reason = {connect_failed, term()} | {send_failed, term()} | term() @@ -343,8 +343,8 @@ -

This is the default SSL configuration option.

-

Defaults to [].

+

This is the SSL/TLS connectin configuration option.

+

Defaults to []. See ssl:connect/[2, 3,4] for availble options.

@@ -353,8 +353,8 @@ from the new URI and returns that as the result, instead of a 30X-result code.

For some 30X-result codes, automatic redirect - is not allowed. In these cases the 30X-result is always to - be returned.

+ is not allowed. In these cases the 30X-result is always + returned.

Default is true.

@@ -453,12 +453,14 @@ requests.

Overrides any value set by function set_options.

-

The validity of the options is not - checked in any way.

-

Notice that this can change the socket behavior - (see inet:setopts/2) - for an already existing one, and therefore an already connected - request handler.

+

The validity of the options is not checked by + the HTTP client they are assumed to be correct and passed + on to ssl application and inet driver, which may reject + them if they are not correct. Note that the current + implementation assumes the requests to the same host, port + combination will use the same socket options. +

+

By default the socket options set by function set_options/[1,2] are used when establishing a connection.

@@ -502,7 +504,7 @@ {RequestId, stream, BinBodyPart} {RequestId, stream_end, Headers} -

Default is the pid() of the process calling the request +

Default is the pid of the process calling the request function (self()).

@@ -582,12 +584,8 @@ If option verify is used, function store_cookies/2 has to be called for the cookies to be saved. Default is disabled. - IpFamily = inet | inet6 | inet6fb4 - When set to inet6fb4, both IPv4 and IPv6 can be used. - First inet6 is tried and if that does not work it falls - back to inet. - The option is to provide a workaround for buggy IPv6 stacks to ensure that - IPv4 always works. Default is inet. + IpFamily = inet | inet6 + Default is inet. IpAddress = ip_address() If the host has several network interfaces, this option specifies which one to use. @@ -610,7 +608,7 @@ different levels of Erlang trace on the client. It is a debug feature. Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used.

Sets options to be used for subsequent requests.

@@ -642,7 +640,7 @@ SetCookieHeaders = headers() - where field = "set-cookie" Url = url() Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used.

Saves the cookies defined in SetCookieHeaders @@ -655,7 +653,7 @@ stream_next(Pid) -> ok Triggers the next message to be streamed, that is, - the same behavior as active ones for sockets. + the same behavior as active one for sockets. Pid = pid() @@ -676,7 +674,7 @@ Dumps the entire cookie database. Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used. cookies() = [cookie_stores()] cookie_stores() = {cookies, cookies()} | {session_cookies, cookies()} cookies() = [cookie()] @@ -695,7 +693,7 @@ Produces a slightly processed dump of the sessions database. Profile = profile() | pid() - When started stand_alone. + When started stand_alone only the pid can be used. session_info() = {GoodSessions, BadSessions, NonSessions} GoodSessions = session() BadSessions = tuple() -- cgit v1.2.3 From 4c9428db3de49f36bc9802c6026147d9b2e401bc Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 2 Sep 2015 14:32:33 +0200 Subject: inets: httpd - Add links and small corrections --- lib/inets/doc/src/http_server.xml | 29 +++++++++++++++-------------- lib/inets/doc/src/httpd.xml | 31 +++++++++++++++---------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index efa5f7a8f5..ee9496d9ba 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -184,7 +184,7 @@

- Htaccess - User Configurable Authentication. + Htaccess - User Configurable Authentication

Web server users without server administrative privileges that need to manage authentication of web pages that are local @@ -356,7 +356,8 @@ UserName:Password

- CGI Version 1.1, RFC 3875 + CGI Version 1.1, + <url href="http://www.ietf.org/rfc/rfc3875.txt">RFC 3875</url>

The module mod_cgi enables execution of CGI scripts on the server. A file matching the definition of a ScriptAlias config directive is treated as a CGI script. A CGI @@ -453,15 +454,15 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ remotehost Remote hostname. rfc931 - The client remote username (RFC 931). + The client remote username (RFC 931). authuser The username used for authentication. [date] - Date and time of the request (RFC 1123). + Date and time of the request (RFC 1123). "request" - The request line exactly as it came from the client (RFC 1945). + The request line exactly as it came from the client (RFC 1945). status - The HTTP status code returned to the client (RFC 1945). + The HTTP status code returned to the client (RFC 1945). bytes The content-length of the document transferred. @@ -546,7 +547,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias.

Exports the following Erlang Web Server API interaction data, if possible:

@@ -579,7 +580,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

@@ -667,7 +668,7 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

@@ -715,7 +716,7 @@ start() ->

Uses the following Erlang web server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias
@@ -727,7 +728,7 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias
@@ -738,7 +739,7 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

@@ -769,7 +770,7 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias @@ -795,7 +796,7 @@ start() ->

Uses the following Erlang Web Server API interaction data:

- real_name - from mod_alias + real_name - from mod_alias

Exports the following Erlang Web Server API interaction data:

diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml index b6d3c5d39b..4e3a875a7f 100644 --- a/lib/inets/doc/src/httpd.xml +++ b/lib/inets/doc/src/httpd.xml @@ -31,7 +31,7 @@ httpd An implementation of an HTTP - 1.1 compliant web server, as defined in RFC 2616. + 1.1 compliant web server, as defined in RFC 2616

This module provides the HTTP server start options, some administrative @@ -115,7 +115,7 @@ -

The properties proplist_file and file are mutually exclusive.

+

The properties proplist_file and file are mutually exclusive. Also newer properties may not be supported as Apache-like options, this is a legacy feature.

@@ -124,7 +124,7 @@ {port, integer()} -

The port that the HTTP server is to listen on. +

The port that the HTTP server listen to. If zero is specified as port, an arbitrary available port is picked and function httpd:info/2 can be used to determine which port was picked.

@@ -378,15 +378,15 @@ text/plain asc txt remotehost Remote. rfc931 - The remote username of the client (RFC 931). + The remote username of the client (RFC 931). authuser The username used for authentication. [date] - Date and time of the request (RFC 1123). + Date and time of the request (RFC 1123). "request" - The request line as it came from the client (RFC 1945). + The request line as it came from the client (RFC 1945). status - The HTTP status code returned to the client (RFC 1945). + The HTTP status code returned to the client (RFC 1945). bytes The content-length of the document transferred. @@ -564,7 +564,7 @@ text/plain asc txt

Method = string() and CgiScript = string(). script adds an action activating a CGI script whenever a file is requested using a certain HTTP method. The - method is either GET or POST, as defined in RFC 1945. It + method is either GET or POST, as defined in RFC 1945. It propagates the URL and file path of the requested document using the standard CGI PATH_INFO and PATH_TRANSLATED environment variables.

@@ -1065,7 +1065,7 @@ text/plain asc txt "http://ServerName:Part/cgi-bin/find.pl?person=jocke"

request_uri

The Request-URI as defined - in RFC 1945, for example, "/cgi-bin/find.pl?person=jocke".

+ in RFC 1945, for example, "/cgi-bin/find.pl?person=jocke".

http_version

The HTTP version of the @@ -1073,7 +1073,7 @@ text/plain asc txt request_line

The Request-Line as - defined in RFC 1945, for example, + defined inRFC 1945, for example, "GET /cgi-bin/find.pl?person=jocke HTTP/1.0".

parsed_header @@ -1089,7 +1089,7 @@ text/plain asc txt entity_body

The entity-Body as defined - in RFC 2616, for example, data sent from a CGI script using the + in RFC 2616, for example, data sent from a CGI script using the POST method.

connection @@ -1142,11 +1142,10 @@ text/plain asc txt RFC 2616 for the appropriate values.

Head is a key value list of HTTP header fields. The - server constructs an HTTP header from this data. See RFC - 2616 for the appropriate value for each header field. If the - client is an HTTP/1.0 client, the server filters the - list so that only HTTP/1.0 header fields are sent back - to the client.

+ server constructs an HTTP header from this data. See RFC 2616 for the appropriate value for each header field. If the + client is an HTTP/1.0 client, the server filters the + list so that only HTTP/1.0 header fields are sent back + to the client.

If Body is returned and equal to {Fun,Arg}, the web server tries apply/2 on Fun with Arg as argument. The web server expects that the fun either -- cgit v1.2.3 From a4f03b39acff16989cd3dc1cfedc58896a8f9fcd Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 2 Sep 2015 14:53:43 +0200 Subject: inets: ftp - Remove information about alternative solutions Currently there is no plans in modernizing/changing the API so there is no real value of pointing out alternative solutions. --- lib/inets/doc/src/ftp_client.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/inets/doc/src/ftp_client.xml b/lib/inets/doc/src/ftp_client.xml index 84fa064551..89e66db814 100644 --- a/lib/inets/doc/src/ftp_client.xml +++ b/lib/inets/doc/src/ftp_client.xml @@ -42,10 +42,7 @@ The FTP client API is designed to allow some functions to return intermediate results. This implies that only the process that started the FTP client can access it with - preserved sane semantics. (This can be solved - by changing the API, using the concept of a controlling - process as with other OTP applications, but - that is something for future releases of Inets.) + preserved sane semantics. If the process that started the FTP session dies, the FTP client process terminates.

-- cgit v1.2.3 From 6285460219d2e79d61294468b1c2915ad2d71456 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 2 Sep 2015 15:05:27 +0200 Subject: inets: Fix copy paste error --- lib/inets/doc/src/introduction.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inets/doc/src/introduction.xml b/lib/inets/doc/src/introduction.xml index ef3e109df5..491835f852 100644 --- a/lib/inets/doc/src/introduction.xml +++ b/lib/inets/doc/src/introduction.xml @@ -29,7 +29,7 @@ 2004-09-28 A - inets_services.xml + introduction.xml
-- cgit v1.2.3 From 628f8cff34f9784cfa34857bcd7133305acc3d27 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 7 Sep 2015 15:51:35 +0200 Subject: inets: Fix broken links --- lib/inets/doc/src/http_server.xml | 6 +++--- lib/inets/doc/src/httpd.xml | 10 +++++----- lib/inets/doc/src/httpd_custom_api.xml | 2 +- lib/inets/doc/src/mod_alias.xml | 4 ++-- lib/inets/doc/src/notes.xml | 36 ++++++++++++++-------------------- 5 files changed, 26 insertions(+), 32 deletions(-) diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index ee9496d9ba..4b6d64fc8f 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -494,7 +494,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ related steps, are considered server core functionality and are not implemented using the Erlang web server API. A description of functionality implemented by the Erlang webserver API is described - in Section + in Section Inets Web Server Modules.

A module can use data generated by previous modules in the @@ -635,11 +635,11 @@ start() -> Then it starts Mnesia and creates the tables. The first argument is the name of the tables, the second argument is a list of options of how to create the table, see - mnesia, documentation for + mnesia, documentation for more information. As the implementation of the mod_auth_mnesia saves one row for each user, the type must be bag. When the schema and the tables are created, function - mnesia:start/0 + mnesia:start/0 is used to start Mnesia and waits for the tables to be loaded. Mnesia uses the directory specified as mnesia_dir at startup if specified, diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml index 4e3a875a7f..2a4aea41c2 100644 --- a/lib/inets/doc/src/httpd.xml +++ b/lib/inets/doc/src/httpd.xml @@ -165,14 +165,14 @@ {profile, atom()} -

Used together with bind_address - and port to uniquely identify +

Used together with bind_address + and port to uniquely identify a HTTP server. This can be useful in a virtualized environment, where there can be more that one server that has the same bind_address and port. If this property is not explicitly set, it is assumed that the - bind_address and - portuniquely identifies the HTTP server. + bind_address and + portuniquely identifies the HTTP server.

@@ -227,7 +227,7 @@ {customize, atom()}

A callback module to customize the inets HTTP servers behaviour - see httpd_custom_api

+ see httpd_custom_api

diff --git a/lib/inets/doc/src/httpd_custom_api.xml b/lib/inets/doc/src/httpd_custom_api.xml index 5840641b37..23417900fa 100644 --- a/lib/inets/doc/src/httpd_custom_api.xml +++ b/lib/inets/doc/src/httpd_custom_api.xml @@ -29,7 +29,7 @@ Behaviour with optional callbacks to customize the inets HTTP server.

The module implementing this behaviour shall be supplied to to the servers - configuration with the option customize

+ configuration with the option customize

diff --git a/lib/inets/doc/src/mod_alias.xml b/lib/inets/doc/src/mod_alias.xml index a7b01efe06..87c950cc6b 100644 --- a/lib/inets/doc/src/mod_alias.xml +++ b/lib/inets/doc/src/mod_alias.xml @@ -106,7 +106,7 @@ FakeName is replaced with RealName in the match. The resulting path is split into two parts, ShortPath and AfterPath, as defined in - httpd_util:split_path/1. + httpd_util:split_path/1. Path is generated from ShortPath, that is, the result from default_index/2 with @@ -140,7 +140,7 @@ not_a_script is returned. If it is a script, the resulting script path is in two parts, ShortPath and AfterPath, as defined in - httpd_util:split_script_path/1. + httpd_util:split_script_path/1. config_db() is the server config file in ETS table format as described in Inets User's Guide.

diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index d1bfa28013..6a6b9c8b23 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -765,9 +765,9 @@

Better handling of errorI(s) during update of the session database.

Also added and updated some debugging functions - which_sessions/10,1 + which_sessions/[0,1] and - info/0.

+ info/0.

Own Id: OTP-10093

Aux Id: Seq 12062

@@ -861,7 +861,7 @@

[httpc] Add function for retrieving current options, - get_options/1,2.

+ get_options/[1,2].

Own Id: OTP-9979

@@ -1038,15 +1038,11 @@
Incompatibilities - -

[httpc] Deprecated interface module http has been removed. It has (long) been replaced by http client interface module - httpc.

+ httpc.

Own Id: OTP-9359

@@ -1234,15 +1230,13 @@
Inets 5.6
Improvements and New Features - +

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

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

Filipe David Manana

Own Id: OTP-9094

@@ -1255,7 +1249,7 @@

[httpd] - mod_esi:deliver/2 + mod_esi:deliver/2 made to accept binary data.

Bernard Duggan

Own Id: OTP-9123

@@ -1283,7 +1277,7 @@ for using file descriptors has been improved. It is now possible to add the file descriptor to the config (option fd) when calling the - inets:start(httpd, ...) + inets:start(httpd, ...) function.

Attila Rajmund Nohl

Own Id: OTP-9202

@@ -1297,7 +1291,7 @@

See the httpd socket_type communication property or the httpc - request/4,5 function + request/[4,5] function for more info.

Own Id: OTP-9230

*** POTENTIAL INCOMPATIBILITY ***

@@ -1497,7 +1491,7 @@

[httpc|httpd] - Now allow the use of the "new" ssl, by using the essl tag instead.

See the http_option option in the - request/4,5 or + request/[4,5] or the socket-type section of the Communication properties chapter for more info,

Own Id: OTP-7907

@@ -1729,8 +1723,8 @@

[httpc] - Allow users to pass socket options to the transport module when making requests.

See the socket_opts option in the - request/4 or - set_options/1,2 + request/4 or + set_options/[1,2] for more info,

Own Id: OTP-8352

@@ -1771,7 +1765,7 @@ deliver an async reply to more receivers then the calling process.

See the - receiver + receiver option for more info,

Own Id: OTP-8106

@@ -2040,7 +2034,7 @@ request, when the client connects to the server. Default value is that of the timeout option.

See the - request/4,5 + request/[4,5] function for more info.

Own Id: OTP-7298

@@ -2147,7 +2141,7 @@ the client connects to the server.

As a side-effect of this, the option ipv6 has been removed and replaced by the ipfamily option.

-

See http:set_options/1,2 +

See http:set_options/[1,2] for more info.

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-8004

-- cgit v1.2.3