From dd446aacf9448f8533f89288bb5374c2b54d2e6b Mon Sep 17 00:00:00 2001 From: Leonid Mokrushin Date: Fri, 3 Jan 2025 13:01:14 +0100 Subject: [PATCH] DOC: spellchecked documentation --- README.md | 2 +- ax.pl | 2 +- cgi_stream.c | 4 ++-- graphql.pl | 6 +++--- html_head.pl | 4 ++-- html_write.pl | 6 +++--- htmx.pl | 2 +- http.doc | 10 +++++----- http_authenticate.pl | 4 ++-- http_cookie.pl | 2 +- http_cors.pl | 4 ++-- http_digest.pl | 6 +++--- http_dirindex.pl | 2 +- http_dispatch.pl | 12 ++++++------ http_dyn_workers.pl | 2 +- http_error.pl | 2 +- http_files.pl | 2 +- http_header.pl | 10 +++++----- http_multipart_plugin.pl | 2 +- http_open.pl | 4 ++-- http_openid.pl | 10 +++++----- http_parameters.pl | 2 +- http_path.pl | 4 ++-- http_pwp.pl | 2 +- http_session.pl | 10 +++++----- http_stream.pl | 16 ++++++++-------- http_unix_daemon.pl | 8 ++++---- http_wrapper.pl | 6 +++--- hub.pl | 4 ++-- js_write.pl | 6 +++--- json.pl | 10 +++++----- json_convert.pl | 6 +++--- mimetype.pl | 2 +- thread_httpd.pl | 4 ++-- 34 files changed, 89 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index a925957..37e3298 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ both HTTP and HTTPS connections and handle all request methods. ## Server library -The main server libraris are +The main server libraries are - `library(http/thread_httpd)` implements the server - `library(http/http_dispatch)` implements binding locations diff --git a/ax.pl b/ax.pl index 928abc3..d37b83b 100644 --- a/ax.pl +++ b/ax.pl @@ -61,7 +61,7 @@ % Only provide the attribute if it is available. This is % mutually exclusive with =required=. This is the default. % - url(+URL) -% Can be used to ovcerrule or extend the ax_alias/2. +% Can be used to overrule or extend the ax_alias/2. % - count(+Count) % Maximum number of values to provide % diff --git a/cgi_stream.c b/cgi_stream.c index d3faae3..52d8142 100644 --- a/cgi_stream.c +++ b/cgi_stream.c @@ -73,7 +73,7 @@ with the request, deciding on: Now, the stream is placed in full buffering mode (SIO_FBUF). If the transfer encoding is 'chunked' it immediately calls the hook using 'send_header' to emit the current header. Output continues. In chunked -mode sending the chunks, otherwisse collecting the data. On close, it +mode sending the chunks, otherwise collecting the data. On close, it writes an empty block (chunked mode) or (normal mode) calls the hook 'send_header' which now has access to the content-length, followed by the data. @@ -434,7 +434,7 @@ cgi_discard(term_t cgi) *******************************/ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Call hook on the data we collected sofar. The hook is called with the +Call hook on the data we collected so far. The hook is called with the following additional arguments: * Event-type (header, data) diff --git a/graphql.pl b/graphql.pl index 42abf6e..663411e 100644 --- a/graphql.pl +++ b/graphql.pl @@ -94,7 +94,7 @@ % Desc = "SWI-Prolog package implementing a SourceHut GraphQL API client.". % ``` % -% Options is a list whose elemenets are one of the following: +% Options is a list whose elements are one of the following: % - token(+Token) % Token is string that will be used as an OAuth2.0 token. See also % graphql_auth_token_hook/2. @@ -284,7 +284,7 @@ % A list of associations of Prolog variable names, given as atoms, % to _GraphQL values_. % -% Occurences of the special lexical construct "" (that is, +% Occurrences of the special lexical construct "" (that is, % ASCII 60, then the codes of the atom Name, then ASCII 62) in % Source are expanded in Document to the _GraphQL value_ Value. % This option can be used to interpolate GraphQL documents with @@ -1040,7 +1040,7 @@ % % Options are a list whose elements are one of: % - separator(+Sep) -% Sep is a list of codes to be used for separating adjancent +% Sep is a list of codes to be used for separating adjacent % GraphQL values in Codes. Defaults to a single space. % This option can be used to separate values with commas % (which are optional throughout GraphQL) by passing diff --git a/html_head.pl b/html_head.pl index ea2efb8..01f49ce 100644 --- a/html_head.pl +++ b/html_head.pl @@ -82,7 +82,7 @@ 2. Replace multiple members by `aggregate' scripts or css files. see use_agregates/4. 3. Order all resources by demanding that their dependencies - preceede the resource itself. Note that the ordering of + precede the resource itself. Note that the ordering of resources in the dependency list is *ignored*. This implies that if the order matters the dependency list must be split and only the primary dependency must be added. @@ -555,7 +555,7 @@ %! html_include(+PathOrList)// is det. % % Include to HTML resources that must be in the HTML -% element. Currently onlu supports =|.js|= and =|.css|= files. +% element. Currently only supports =|.js|= and =|.css|= files. % Extend this to support more header material. Do not use this % predicate directly. html_requires//1 is the public interface to % include HTML resources. diff --git a/html_write.pl b/html_write.pl index 7aacfac..1d7e830 100644 --- a/html_write.pl +++ b/html_write.pl @@ -836,7 +836,7 @@ % Quote the value according to the rules for tag-attributes % included in double-quotes. Note that -like html_quoted//1-, % attributed values printed through html//1 are quoted -% atomatically. +% automatically. % % @tbd Assumes UTF-8 encoding of the output. @@ -908,7 +908,7 @@ %! html_receive(+Id, :Handler)// is det. % % This extended version of html_receive//1 causes Handler to be -% called to process all messages posted to the channal at the time +% called to process all messages posted to the channel at the time % output is generated. Handler is called as below, where % `PostedTerms` is a list of Module:Term created from calls to % html_post//2. Module is the context module of html_post and Term @@ -938,7 +938,7 @@ % Collect posted tokens and copy them into the receiving % mailboxes. Mailboxes may produce output for each other, but not % cyclic. The current scheme to resolve this is rather naive: It -% simply permutates the mailbox resolution order until it found a +% simply permutes the mailbox resolution order until it found a % working one. Before that, it puts =head= and =script= boxes at % the end. diff --git a/htmx.pl b/htmx.pl index fd5cdd8..97ed13a 100644 --- a/htmx.pl +++ b/htmx.pl @@ -53,7 +53,7 @@ HTML fragment that extends or replaces an element on the page. This allows us to program a most functionality interactive seen in modern web applications using the powerful SWI-Prolog HTML generation framework -rather than having to write a JSON backend and accompagnying JavaScript +rather than having to write a JSON backend and accompanying JavaScript frontend that runs in the browser. Below is a minimal, yet fully functional application diff --git a/http.doc b/http.doc index 4e528be..0affe70 100644 --- a/http.doc +++ b/http.doc @@ -99,7 +99,7 @@ This library provides http_open/3 and friends. It is a library for opening an endpoint identified by an HTTP URL as a Prolog stream. The general skeleton for using this library is given below, where \nopredref{process}{1} processes the data from the -HTTP server.\footnote{One may opt to use cleanup/2 intead of +HTTP server.\footnote{One may opt to use cleanup/2 instead of setup_call_cleanup/3 to allow for aborting while http_open/3 is waiting for the connection.} @@ -458,7 +458,7 @@ message. Options fall into three categories: those that handle presence of the parameter, those that guide conversion and restrict types and -those that support automatic generation of documention. First, +those that support automatic generation of documentation. First, the presence-options: \begin{description} @@ -933,7 +933,7 @@ present. If the dispatch module is used (see \secref{httpdispatch}), spawning is normally specified as an option to the http_handler/3 registration. -We recomment the use of thread pools. They allow registration of a set +We recommend the use of thread pools. They allow registration of a set of threads using common characteristics, specify how many can be active and what to do if all threads are active. A typical application may define a small pool of threads with large stacks for computation @@ -1098,7 +1098,7 @@ not start with \chr{/}. This problem can also be solved using the contributed Apache module \const{proxy_html} that can be instructed to rewrite URLs embedded in -HTML documents. In our experience, this is not troublefree as URLs can +HTML documents. In our experience, this is not trouble-free as URLs can appear in many places in generated documents. JavaScript can create URLs on the fly, which makes rewriting virtually impossible. @@ -1301,7 +1301,7 @@ The example below generates a URL that references the predicate set_lang/1 in the application with given parameters. The http_handler/3 declaration binds \const{/setlang} to the predicate set_lang/1 for which we provide a very simple implementation. The code between \const{...} -is part of an HTML page showing the english flag which, when pressed, +is part of an HTML page showing the English flag which, when pressed, calls \term{set_lang}{Request} where \arg{Request} contains the search parameter \mbox{\const{lang} = \const{en}}. Note that the HTTP location (path) \const{/setlang} can be moved without affecting this code. diff --git a/http_authenticate.pl b/http_authenticate.pl index 3dc2e41..15256e2 100644 --- a/http_authenticate.pl +++ b/http_authenticate.pl @@ -66,7 +66,7 @@ % to Type. Type identifies the required authentication technique: % % * basic(+PasswordFile) -% Use HTTP =Basic= authetication and verify the password +% Use HTTP =Basic= authentication and verify the password % from PasswordFile. PasswordFile is a file holding % usernames and passwords in a format compatible to % Unix and Apache. Each line is record with =|:|= @@ -92,7 +92,7 @@ % % @param Fields is a list of fields from the password-file entry. % The first element is the user. The hash is skipped. -% @tbd Should we also cache failures to reduce the risc of +% @tbd Should we also cache failures to reduce the risk of % DoS attacks? http_authenticate(basic(File), Request, [User|Fields]) :- diff --git a/http_cookie.pl b/http_cookie.pl index edd9c20..c0b0e57 100644 --- a/http_cookie.pl +++ b/http_cookie.pl @@ -233,7 +233,7 @@ % % Query current cookie database. If Name is given, it is matched % case insensitive against the known cookies. If it is unbound, -% the cookie name is returned in its oiginal case (case +% the cookie name is returned in its original case (case % preserving). cookie_current_cookie(ClientId, Name, Value, Options) :- diff --git a/http_cors.pl b/http_cors.pl index 0d39947..04272cf 100644 --- a/http_cors.pl +++ b/http_cors.pl @@ -46,11 +46,11 @@ This small module allows for enabling Cross-Origin Resource Sharing (CORS) for a specific request. Typically, CORS is enabled for API -services that you want to have useable from browser client code that is +services that you want to have usable from browser client code that is loaded from another domain. An example are the LOD and SPARQL services in ClioPatria. -Because CORS is a security risc (see references), it is disabled by +Because CORS is a security risk (see references), it is disabled by default. It is enabled through the setting http:cors. The value of this setting is a list of domains that are allowed to access the service. Because * is used as a wildcard match, the value [*] allows access from diff --git a/http_digest.pl b/http_digest.pl index 4737c35..7f43a4c 100644 --- a/http_digest.pl +++ b/http_digest.pl @@ -58,7 +58,7 @@ This library implements HTTP _Digest Authentication_ as per RFC2617. Unlike _Basic Authentication_, digest authentication is based on -challenge-reponse and therefore does not need to send the password over +challenge-response and therefore does not need to send the password over the (insecure) connection. In addition, it provides a count mechanism that ensure that old credentials cannot be reused, which prevents attackers from using old credentials with a new request. Digest @@ -369,12 +369,12 @@ %! http_digest_authenticate(+Request, -User, -UserFields, +Options) % -% Validate the client reponse from the Request header. On success, +% Validate the client response from the Request header. On success, % User is the validated user and UserFields are additional fields % from the password file. Options include: % % - passwd_file(+File) -% Validate passwords agains the given password file. The +% Validate passwords against the given password file. The % file is read using http_current_user/3 from % library(http/http_authenticate). % - stale(-Stale) diff --git a/http_dirindex.pl b/http_dirindex.pl index 59c694a..c1880c2 100644 --- a/http_dirindex.pl +++ b/http_dirindex.pl @@ -121,7 +121,7 @@ % Sort the files in the directory listing by Field. Field % is one of =name= (default), =size= or =time=. % * order(+AscentDescent) -% Sorting order. Default is =ascending=. The altenative is +% Sorting order. Default is =ascending=. The alternative is % =descending= % * name(:RenderName) % DCG used to render a name in the table. The File is passed. diff --git a/http_dispatch.pl b/http_dispatch.pl index 6b0ceda..0168718 100644 --- a/http_dispatch.pl +++ b/http_dispatch.pl @@ -160,7 +160,7 @@ % Options is a list containing the following options: % % - authentication(+Type) -% Demand authentication. Authentication methods are pluggable. The +% Demand authentication. Authentication methods are plugable. The % library http_authenticate.pl provides a plugin for user/password % based =Basic= HTTP authentication. % @@ -624,7 +624,7 @@ % returned location is the path up to the first variable, e.g., % =|/user/|= in the example above. % -% User code is adviced to use http_link_to_id/3 which can also add +% User code is advised to use http_link_to_id/3 which can also add % query parameters to the URL. This predicate is a helper for % http_link_to_id/3. % @@ -768,7 +768,7 @@ % ``` % % @arg HandleID is either an atom, possibly module qualified -% predicate or a compound term if the hander is defined using +% predicate or a compound term if the handler is defined using % a pattern. See http_handler/3 and http_location_by_id/2. % % @arg Parameters is one of @@ -1071,7 +1071,7 @@ % * static_gzip(+Boolean) % If `true` (default `false`) and, in addition to the plain % file, there is a ``.gz`` file that is not older than the -% plain file and the client acceps =gzip= encoding, send +% plain file and the client accepts =gzip= encoding, send % the compressed file with ``Transfer-encoding: gzip``. % % * cached_gzip(+Boolean) @@ -1327,7 +1327,7 @@ %! path_tree(-Tree) is det. % -% Compile paths into a tree. The treee is multi-rooted and +% Compile paths into a tree. The tree is multi-rooted and % represented as a list of nodes, where each node has the form: % % node(PathOrPrefix, Action, Options, Children) @@ -1337,7 +1337,7 @@ % worker thread holds a copy of the tree. If handler facts are % changed the _generation_ is incremented using next_generation/0 % and each worker thread will re-compute the tree on the next -% ocasion. +% occasion. path_tree(Tree) :- current_generation(G), diff --git a/http_dyn_workers.pl b/http_dyn_workers.pl index 092d228..23293c2 100644 --- a/http_dyn_workers.pl +++ b/http_dyn_workers.pl @@ -82,7 +82,7 @@ %! http:schedule_workers(+Dict) % % Called if there is no immediately free worker to handle the -% incomming request. The request is forwarded to the thread +% incoming request. The request is forwarded to the thread % =|__http_scheduler|= as the hook is called in time critical code. :- multifile diff --git a/http_error.pl b/http_error.pl index 7bfd6fe..912eaca 100644 --- a/http_error.pl +++ b/http_error.pl @@ -49,7 +49,7 @@ can be controlled by - nodebug(http(error)) - After disabling the http(error) debug channal, errors are only sent + After disabling the http(error) debug channel, errors are only sent to the client. See nodebug/1 and debug/1. - set_setting(http:client_backtrace, false) Stop sending stack traces to the client. Note that sending the stack diff --git a/http_files.pl b/http_files.pl index 3763dac..7f50921 100644 --- a/http_files.pl +++ b/http_files.pl @@ -57,7 +57,7 @@ be created using the following code sample, which starts a server at port 8080 that serves files from the current directory ('.'). Note that the handler needs a `prefix` option to specify that it must handle all -paths that begin with the registed location of the handler. +paths that begin with the registered location of the handler. ``` :- use_module(library(http/http_server)). diff --git a/http_header.pl b/http_header.pl index f04d6ee..d9ccdeb 100644 --- a/http_header.pl +++ b/http_header.pl @@ -484,7 +484,7 @@ %! status_has_content(+StatusTerm, -HTTPCode) % % True when StatusTerm is a status that usually comes with an -% expanatory content message. +% explanatory content message. status_has_content(created(_Location)). status_has_content(moved(_To)). @@ -871,7 +871,7 @@ % % Decide on the transfer encoding from the Request and the CGI % header. The behaviour depends on the setting -% http:chunked_transfer. If =never=, even explitic requests are +% http:chunked_transfer. If =never=, even explicit requests are % ignored. If =on_request=, chunked encoding is used if requested % through the CGI header and allowed by the client. If % =if_possible=, chunked encoding is used whenever the client @@ -933,7 +933,7 @@ %! content_length_in_encoding(+Encoding, +In, -Bytes) % -% Determine hom many bytes are required to represent the data from +% Determine how many bytes are required to represent the data from % stream In using the given encoding. Fails if the data cannot be % represented with the given encoding. @@ -1786,7 +1786,7 @@ %! read_field_value(-Codes)// % -% Read a field eagerly upto the next whitespace +% Read a field eagerly up to the next whitespace read_field_value([H|T]) --> [H], @@ -2749,7 +2749,7 @@ %! address// % -% Emit the HTML for the server address on behalve of error and +% Emit the HTML for the server address on behalf of error and % status messages (non-200 replies). Default is % % == diff --git a/http_multipart_plugin.pl b/http_multipart_plugin.pl index 6853603..505643e 100644 --- a/http_multipart_plugin.pl +++ b/http_multipart_plugin.pl @@ -60,7 +60,7 @@ %! http_client:http_convert_data(+In, +Fields, -Data, +Options) is semidet. % % Convert =|multipart/form-data|= messages for http_read_data/3. -% This plugin adds the folling options to http_read_data/3: +% This plugin adds the following options to http_read_data/3: % % * form_data(+AsForm) % If the content-type is =|multipart/form-data|=, return the diff --git a/http_open.pl b/http_open.pl index d5e46ef..d6206fc 100644 --- a/http_open.pl +++ b/http_open.pl @@ -993,7 +993,7 @@ % % Parse the header lines for the headers(-List) option. Invalid % header lines are skipped, printing a warning using -% pring_message/2. +% print_message/2. parse_headers([], []) :- !. parse_headers([Line|Lines], Headers) :- @@ -1782,7 +1782,7 @@ % % This hook is used by the HTTP client library to define default % options based on the the broken-down request-URL. The following -% example redirects all trafic, except for localhost over a proxy: +% example redirects all traffic, except for localhost over a proxy: % % ``` % :- multifile diff --git a/http_openid.pl b/http_openid.pl index a530405..f9a55f9 100644 --- a/http_openid.pl +++ b/http_openid.pl @@ -253,7 +253,7 @@ % - Find the OpenID claimed identity and server % - Associate to the OpenID server % - redirects to the OpenID server for validation -% 4. The OpenID server will redirect here with the authetication +% 4. The OpenID server will redirect here with the authentication % information. This is handled by openid_authenticate/4. % % Options: @@ -581,7 +581,7 @@ %! public_url(+Request, +Path, -URL) is det. % -% True when URL is a publically useable URL that leads to Path on +% True when URL is a publicly usable URL that leads to Path on % the current server. public_url(Request, Path, URL) :- @@ -610,8 +610,8 @@ % Find the public URL for Request that we can make available to our % identity provider. This must be an absolute URL where we can be % contacted. Before trying a configured version through -% http_public_url/2, we try to see wether the login message contains a -% referer parameter or wether the browser provided one. +% http_public_url/2, we try to see whether the login message contains a +% referrer parameter or whether the browser provided one. openid_current_url(Request, URL) :- option(request_uri(URI), Request), @@ -1239,7 +1239,7 @@ % % Associate with an open-id server. We first check for a still % valid old association. If there is none or it is expired, we -% esstablish one and remember it. Options: +% establish one and remember it. Options: % % * ns(URL) % One of =http://specs.openid.net/auth/2.0= (default) or diff --git a/http_parameters.pl b/http_parameters.pl index 802219e..d7f6b80 100644 --- a/http_parameters.pl +++ b/http_parameters.pl @@ -98,7 +98,7 @@ % fetched using call(Goal, A, Declarations). % % * form_data(-Data) -% Return the data read from the GET por POST request as a +% Return the data read from the GET or POST request as a % list Name = Value. All data, including name/value pairs % used for Parms, is unified with Data. % diff --git a/http_path.pl b/http_path.pl index a982b63..5271f85 100644 --- a/http_path.pl +++ b/http_path.pl @@ -63,7 +63,7 @@ This module provides an abstract specification of HTTP server locations that is inspired on absolute_file_name/3. The specification is done by adding rules to the dynamic multifile predicate http:location/3. The -speficiation is very similar to user:file_search_path/2, but takes an +specification is very similar to user:file_search_path/2, but takes an additional argument with options. Currently only one option is defined: * priority(+Integer) @@ -118,7 +118,7 @@ % % This library provides a default for the abstract location % =root=. This defaults to the setting http:prefix or, when not -% available to the path =|/|=. It is adviced to define all +% available to the path =|/|=. It is advised to define all % locations (ultimately) relative to =root=. For example, use % root('home.html') rather than =|'/home.html'|=. diff --git a/http_pwp.pl b/http_pwp.pl index 204ec99..d8edf8e 100644 --- a/http_pwp.pl +++ b/http_pwp.pl @@ -62,7 +62,7 @@ /** Serve PWP pages through the HTTP server -This module provides convience predicates to include PWP (Prolog +This module provides convenience predicates to include PWP (Prolog Well-formed Pages) in a Prolog web-server. It provides the following predicates: diff --git a/http_session.pl b/http_session.pl index 3f793f8..c711355 100644 --- a/http_session.pl +++ b/http_session.pl @@ -165,7 +165,7 @@ % atom. See route/1. % % * enabled(+Boolean) -% Enable/disable session management. Sesion management +% Enable/disable session management. Session management % is enabled by default after loading this file. % % * create(+Atom) @@ -173,7 +173,7 @@ % (default), which creates a session if there is a request % whose path matches the defined session path or =noauto=, % in which cases sessions are only created by calling -% http_open_session/2 explicitely. +% http_open_session/2 explicitly. % % * proxy_enabled(+Boolean) % Enable/disable proxy session management. Proxy session @@ -193,7 +193,7 @@ % strict has best security, but prevents links from % external sites from operating properly. lax stops most % CSRF attacks against REST endpoints but rarely interferes -% with legitimage operations. `none` removes the samesite +% with legit image operations. `none` removes the samesite % attribute entirely. __Caution: The value `none` exposes the % entire site to CSRF attacks. % * granularity(+Integer) @@ -924,8 +924,8 @@ %! route(-RouteID) is semidet. % % Fetch the route identifier. This value is added as . to -% the session cookie and used by -for example- the apache load -% balanching module. The default route is the local name of the +% the session cookie and used by -for example- the Apache load +% balancing module. The default route is the local name of the % host. Alternatives may be provided using % http_set_session_options/1. diff --git a/http_stream.pl b/http_stream.pl index 9cfc41c..f58861f 100644 --- a/http_stream.pl +++ b/http_stream.pl @@ -64,7 +64,7 @@ The predicate http_chunked_open/3 realises encoding and decoding of the HTTP _Chunked_ encoding. This encoding is an obligatory part of the HTTP -1.1 specification. Messages are split into chunks, each preceeded by the +1.1 specification. Messages are split into chunks, each preceded by the length of the chunk. Chunked encoding allows sending messages over a serial link (typically a TCP/IP stream) for which the reader knows when the message is ended. Unlike standard HTTP though, the sender does not @@ -75,7 +75,7 @@ The predicate stream_range_open/3 handles the Content-length on an input stream for handlers that are designed to process an entire file. The filtering stream claims end-of-file after reading a specified number of -bytes, dispite the fact that the underlying stream may be longer. +bytes, despite the fact that the underlying stream may be longer. @see The HTTP 1.1 protocol http://www.w3.org/Protocols/rfc2616/rfc2616.html */ @@ -189,7 +189,7 @@ * MULTIPART * *******************************/ -%! multipart_open(+Stream, -DataSttream, +Options) is det. +%! multipart_open(+Stream, -DataStream, +Options) is det. % % DataStream is a stream that signals `end_of_file` if the % multipart _boundary_ is encountered. The stream can be reset to @@ -286,7 +286,7 @@ % this stream. % * thread(-ThreadID) % ThreadID is the identifier of the `owning thread' -% * transfer_encoding(-Tranfer) +% * transfer_encoding(-Transfer) % One of =chunked= or =none=. % * connection(-Connection) % One of =Keep-Alive= or =close= @@ -304,7 +304,7 @@ %! cgi_set(+CGIStream, ?Property) is det. % -% Change one of the properies. Supported properties are: +% Change one of the properties. Supported properties are: % % * request(+Term) % Associate a request to the stream. @@ -314,10 +314,10 @@ % client. % * connection(-Connection) % One of =Keep-Alive= or =close=. -% * transfer_encoding(-Tranfer) +% * transfer_encoding(-Transfer) % One of =chunked= or =none=. Initially set to =none=. When % switching to =chunked= from the =header= hook, it calls the -% =send_header= hook and if there is data queed this is send +% =send_header= hook and if there is data queued this is send % as first chunk. Each subsequent write to the CGI stream % emits a chunk. The implementation does __not__ use the % chunked stream filter defined by http_chunked_open/3. It @@ -327,7 +327,7 @@ %! cgi_discard(+CGIStream) is det. % -% Discard content produced sofar. It sets the state property to +% Discard content produced so far. It sets the state property to % =discarded=, causing close to omit the writing the data. This % must be used for an alternate output (e.g. an error page) if the % page generator fails. diff --git a/http_unix_daemon.pl b/http_unix_daemon.pl index ca33442..8335b23 100644 --- a/http_unix_daemon.pl +++ b/http_unix_daemon.pl @@ -80,7 +80,7 @@ - Select the port(s) to be used by the server - Run the startup of the process as root to perform privileged - tasks and the server itself as unpriviledged user, for example + tasks and the server itself as unprivileged user, for example to open ports below 1000. - Fork and detach from the controlling terminal - Handle console and debug output using a file and/or the syslog @@ -606,7 +606,7 @@ % Start the HTTP server. It performs the following steps: % % 1. Call broadcast(http(pre_server_start)) -% 2. Foreach server +% 2. For each server % a. Call broadcast(http(pre_server_start(Port))) % b. Call http_server(http_dispatch, Options) % c. Call broadcast(http(post_server_start(Port))) @@ -780,7 +780,7 @@ %! server_redirect(+To, +Request) % -% Redirect al requests for this server to the specified server. To +% Redirect all requests for this server to the specified server. To % is one of: % % $ A port (integer) : @@ -823,7 +823,7 @@ %! setup_debug(+Options) is det. % -% Initialse debug/3 topics. The =|--debug|= option may be used +% Initialise debug/3 topics. The =|--debug|= option may be used % multiple times. setup_debug(Options) :- diff --git a/http_wrapper.pl b/http_wrapper.pl index 4fa27df..c1f070a 100644 --- a/http_wrapper.pl +++ b/http_wrapper.pl @@ -66,11 +66,11 @@ It is used by library(thread_httpd) and library(inet_httpd) (deprecated). -Still, it provides a few predicates that are occasinally useful for +Still, it provides a few predicates that are occasionally useful for applications: - http_current_request/1 finds the current request for occasional - usage in places where it is not avaialable otherwise. + usage in places where it is not available otherwise. - http_peer/2 finds the (IP4) peer address, getting the original address if we are behind a proxy (=X-Forwarded-For=) - http_relative_path/2 can be used to find a relative path from @@ -84,7 +84,7 @@ % stream `Out'. % % The goal is assumed to write the reply to =current_output= -% preceeded by an HTTP header, closed by a blank line. The header +% preceded by an HTTP header, closed by a blank line. The header % *must* contain a Content-type: line. It may optionally % contain a line =|Transfer-encoding: chunked|= to request chunked % encoding. diff --git a/hub.pl b/hub.pl index a7db254..86c785f 100644 --- a/hub.pl +++ b/hub.pl @@ -83,7 +83,7 @@ - hub_broadcast/2 sends a message to all clients of the hub. -A hub consists of (currenty) four message queues and a simple dynamic +A hub consists of (currently) four message queues and a simple dynamic fact. Threads that are needed for the communication tasks are created on demand and die if no more work needs to be done. @@ -150,7 +150,7 @@ Windows it allows to wait for at most 64 sockets. In addition, there is no way to add an additional input for control messages because Windows select() can only wait for sockets. On Unix we could use pipe/2 to add -the control channal. On Windows we would need an additional network +the control channel. On Windows we would need an additional network service, giving rise its own problems with allocation, firewalls and security. diff --git a/js_write.pl b/js_write.pl index c97811b..31e514e 100644 --- a/js_write.pl +++ b/js_write.pl @@ -248,12 +248,12 @@ % by this library. % $ object(Attributes) : % Where Attributes is a Key-Value list where each pair can be -% written as Key-Value, Key=Value or Key(Value), accomodating +% written as Key-Value, Key=Value or Key(Value), accommodating % all common constructs for this used in Prolog. % $ { K:V, ... } % Same as object(Attributes), providing a more JavaScript-like % syntax. This may be useful if the object appears literally -% in the source-code, but is generally less friendlyto produce +% in the source-code, but is generally less friendly to produce % as a result from a computation. % $ Dict : % Emit a dict as a JSON object using json_write_dict/3. @@ -265,7 +265,7 @@ % emitting JavaScript symbols (i.e. function- or variable % names). % $ Number : -% Emited literally +% Emitted literally % $ symbol(Atom) : % Synonym for @(Atom). Deprecated. % $ Atom or String : diff --git a/json.pl b/json.pl index 88df1e3..35abca9 100644 --- a/json.pl +++ b/json.pl @@ -546,7 +546,7 @@ % single-line output. % % * step(+Step) -% Indentation increnment for next level. Default is 2. +% Indentation increment for next level. Default is 2. % % * tab(+TabDistance) % Distance between tab-stops. If equal to Step, layout @@ -557,7 +557,7 @@ % print them as a JSON string. The default raises a type % error. Note that this option only makes sense if you can % guarantee that the passed value is not an otherwise valid -% Prolog reporesentation of a Prolog term. +% Prolog representation of a Prolog term. % % If a string is emitted, the sequence =| Determine mime-type for a file Simple library to guess the mime-type from the extension of a file. As -various applications need to do this type ofinferencing it seems +various applications need to do this type of inferencing it seems worthwhile to place this functionality in an extensible library. @tbd Consider content handling (using the Unix file command) diff --git a/thread_httpd.pl b/thread_httpd.pl index e1e5c92..152fdd7 100644 --- a/thread_httpd.pl +++ b/thread_httpd.pl @@ -245,7 +245,7 @@ %! make_socket(+Address, :OptionsIn, -OptionsOut) is det. % % Create the HTTP server socket and worker pool queue. OptionsOut -% is quaranteed to hold the option queue(QueueId). +% is guaranteed to hold the option queue(QueueId). % % @arg OptionsIn is qualified to allow passing the % module-sensitive ssl option argument. @@ -1063,7 +1063,7 @@ %! update_rate_mma(!State, -MMA) is det. % % Implement _Modified Moving Average_ computing the average time -% between requests as an exponential moving averate with alpha=1/N. +% between requests as an exponential moving average with alpha=1/N. % % @arg Resolution is the time resolution in 1/Resolution seconds. All % storage is done in integers to avoid the need for stack freezing in