Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for forwarded attribute #1911

Merged
merged 29 commits into from
May 24, 2017
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs pass spellchecker
Evert Lammerts committed May 23, 2017
commit 36e50c42996ae2df680b2040d3997f70b4232e04
14 changes: 7 additions & 7 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ and :ref:`aiohttp-web-signals` handlers.

Makes an effort to parse Forwarded headers as specified by :rfc:`7239`:

- It adds one (immutable) dictionary per Forwarded ``field-value``, ie
- It adds one (immutable) dictionary per Forwarded ``field-value``, i.e.
per proxy. The element corresponds to the data in the Forwarded
``field-value`` added by the first proxy encountered by the client.
Each subsequent item corresponds to those added by later proxies.
@@ -104,26 +104,26 @@ and :ref:`aiohttp-web-signals` handlers.
- It un-escapes ``quoted-pairs``.
- It does NOT validate 'by' and 'for' contents as specified in
:rfc:`7239#section-6`.
- It does NOT validate 'host' contents (Host ABNF).
- It does NOT validate 'proto' contents for valid URI scheme names.
- It does NOT validate ``host`` contents (Host ABNF).
- It does NOT validate ``proto`` contents for valid URI scheme names.

Returns a tuple containing one or more immutable dicts
Returns a tuple containing one or more ``MappingProxy`` objects

.. seealso:: :attr:`scheme`

.. seealso:: :attr:`host`

.. attribute:: host

Hostname of the request.
Host name of the request.

Hostname is resolved through the following headers, in this order:
Host name is resolved through the following headers, in this order:

- *Forwarded*
- *X-Forwarded-Host*
- *Host*

Returns :class:`str`, or ``None`` if no hostname is found in the
Returns :class:`str`, or ``None`` if no host name is found in the
headers.

.. attribute:: path_qs