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(-) (limited to 'lib') 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()