[Python-checkins] python/nondist/peps pep-0268.txt,1.6,1.7
gstein@users.sourceforge.net
gstein@users.sourceforge.net
Wed, 04 Sep 2002 23:44:48 -0700
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv32270
Modified Files:
pep-0268.txt
Log Message:
Initial changes for reStructuredText. Mostly, this is about turning
some of the text into ``literals``
Index: pep-0268.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0268.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pep-0268.txt 21 Oct 2001 22:55:37 -0000 1.6
--- pep-0268.txt 5 Sep 2002 06:44:46 -0000 1.7
***************
*** 9,28 ****
Python-Version: 2.x
Post-History: 21-Aug-2001
Abstract
This PEP discusses new modules and extended functionality for
Python's HTTP support. Notably, the addition of authenticated
! requests, proxy support, authenticated proxy usage, and WebDAV [1]
capabilities.
Rationale
Python has been quite popular as a result of its "batteries
included" positioning. One of the most heavily used protocols,
HTTP (see RFC 2616), has been included with Python for years
! (httplib). However, this support has not kept up with the full
needs and requirements of many HTTP-based applications and
systems. In addition, new protocols based on HTTP, such as WebDAV
--- 9,31 ----
Python-Version: 2.x
Post-History: 21-Aug-2001
+ Content-Type: text/x-rst
Abstract
+ ========
This PEP discusses new modules and extended functionality for
Python's HTTP support. Notably, the addition of authenticated
! requests, proxy support, authenticated proxy usage, and WebDAV_
capabilities.
Rationale
+ =========
Python has been quite popular as a result of its "batteries
included" positioning. One of the most heavily used protocols,
HTTP (see RFC 2616), has been included with Python for years
! (``httplib``). However, this support has not kept up with the full
needs and requirements of many HTTP-based applications and
systems. In addition, new protocols based on HTTP, such as WebDAV
***************
*** 34,39 ****
While authentication and proxy support are two very notable
features missing from Python's core HTTP processing, they are
! minimally handled as part of Python's URL handling (urllib and
! urllib2). However, applications that need fine-grained or
sophisticated HTTP handling cannot make use of the features while
they reside in urllib. Refactoring these features into a location
--- 37,42 ----
While authentication and proxy support are two very notable
features missing from Python's core HTTP processing, they are
! minimally handled as part of Python's URL handling (``urllib`` and
! ``urllib2``). However, applications that need fine-grained or
sophisticated HTTP handling cannot make use of the features while
they reside in urllib. Refactoring these features into a location
***************
*** 50,67 ****
Specification
! Two modules will be added to the standard library: 'httpx' (HTTP
! extended functionality), and 'davlib' (WebDAV library).
! [ suggestions for module names are welcome; davlib has some
! precedence, but something like 'webdav' might be desirable ]
HTTP Authentication
! The httpx module will provide a mixin for performing HTTP
authentication (for both proxy and origin server
! authentication). This mixin (httpx.HandleAuthentication) can be
! combined with the HTTPConnection and the HTTPSConnection classes
(the mixin may possibly work with the HTTP and HTTPS compatibility
classes, but that is not a requirement).
--- 53,72 ----
Specification
+ =============
! Two modules will be added to the standard library: ``httpx`` (HTTP
! extended functionality), and ``davlib`` (WebDAV library).
! [ suggestions for module names are welcome; ``davlib`` has some
! precedence, but something like ``webdav`` might be desirable ]
HTTP Authentication
+ -------------------
! The ``httpx`` module will provide a mixin for performing HTTP
authentication (for both proxy and origin server
! authentication). This mixin (``httpx.HandleAuthentication``) can be
! combined with the ``HTTPConnection`` and the ``HTTPSConnection`` classes
(the mixin may possibly work with the HTTP and HTTPS compatibility
classes, but that is not a requirement).
***************
*** 75,85 ****
registered and used by the connections.
! A "credentials" object (httpx.Credentials) is also associated with
the mixin, and stores the credentials (e.g. username and password)
needed by the authenticators. Subclasses of Credentials can be
created to hold additional information (e.g. NT domain).
! The mixin overrides the getresponse() method to detect 401
! (Unauthorized) and 407 (Proxy Authentication Required)
responses. When this is found, the response object, the
connection, and the credentials are passed to the authenticator
--- 80,90 ----
registered and used by the connections.
! A "credentials" object (``httpx.Credentials``) is also associated with
the mixin, and stores the credentials (e.g. username and password)
needed by the authenticators. Subclasses of Credentials can be
created to hold additional information (e.g. NT domain).
! The mixin overrides the ``getresponse()`` method to detect ``401
! (Unauthorized)`` and ``407 (Proxy Authentication Required)``
responses. When this is found, the response object, the
connection, and the credentials are passed to the authenticator
***************
*** 105,109 ****
information.
! If the body is too large to be stored, then the getresponse()
simply returns the response object, indicating the 401 or 407
error. Since the authentication information has been computed and
--- 110,114 ----
information.
! If the body is too large to be stored, then the ``getresponse()``
simply returns the response object, indicating the 401 or 407
error. Since the authentication information has been computed and
***************
*** 119,137 ****
and that can be useful in determining the credentials to send to
the server. The Basic authentication scheme is typically set up
! hierarchically: the credentials for /path can be tried for
! /path/subpath. The Digest authentication scheme has explicit
! support for the hierarchical setup. The httpx.Credentials object
will store credentials for multiple protection spaces, and can be
looked up in two differents ways:
! 1) looked up using (host, port, path) -- this lookup scheme is
used when generating a request for a path where we don't know the
authentication realm.
! 2) looked up using (host, port, realm) -- this mechanism is used
during the authentication process when the server has specified
that the Request-URI resides within a specific realm.
! The HandleAuthentication mixin will override putrequest() to
automatically insert credentials, if available. The URL from the
putrequest is used to determine the appropriate authentication
--- 124,142 ----
and that can be useful in determining the credentials to send to
the server. The Basic authentication scheme is typically set up
! hierarchically: the credentials for ``/path`` can be tried for
! ``/path/subpath``. The Digest authentication scheme has explicit
! support for the hierarchical setup. The ``httpx.Credentials`` object
will store credentials for multiple protection spaces, and can be
looked up in two differents ways:
! 1) looked up using ``(host, port, path)`` -- this lookup scheme is
used when generating a request for a path where we don't know the
authentication realm.
! 2) looked up using ``(host, port, realm)`` -- this mechanism is used
during the authentication process when the server has specified
that the Request-URI resides within a specific realm.
! The ``HandleAuthentication`` mixin will override ``putrequest()`` to
automatically insert credentials, if available. The URL from the
putrequest is used to determine the appropriate authentication
***************
*** 146,157 ****
Proxy Handling
! The httpx module will provide a mixin for using a proxy to perform
! HTTP(S) operations. This mixin (httpx.UseProxy) can be combined
! with the HTTPConnection and the HTTPSConnection classes (the mixin
may possibly work with the HTTP and HTTPS compatibility classes,
but that is not a requirement).
! The mixin will record the (host, port) of the proxy to use. XXX
will be overridden to use this host/port combination for
connections and to rewrite request URLs into the absoluteURIs
--- 151,163 ----
Proxy Handling
+ --------------
! The ``httpx`` module will provide a mixin for using a proxy to perform
! HTTP(S) operations. This mixin (``httpx.UseProxy``) can be combined
! with the ``HTTPConnection`` and the ``HTTPSConnection`` classes (the mixin
may possibly work with the HTTP and HTTPS compatibility classes,
but that is not a requirement).
! The mixin will record the ``(host, port)`` of the proxy to use. XXX
will be overridden to use this host/port combination for
connections and to rewrite request URLs into the absoluteURIs
***************
*** 159,172 ****
server).
! Proxy authentication is handled by the httpx.HandleAuthentication
! class since a user may directly use HTTP(S)Connection to speak
with proxies.
WebDAV Features
! The davlib module will provide a mixin for sending WebDAV requests
! to a WebDAV-enabled server. This mixin (davlib.DAVClient) can be
! combined with the HTTPConnection and the HTTPSConnection classes
(the mixin may possibly work with the HTTP and HTTPS compatibility
classes, but that is not a requirement).
--- 165,179 ----
server).
! Proxy authentication is handled by the ``httpx.HandleAuthentication``
! class since a user may directly use ``HTTP(S)Connection`` to speak
with proxies.
WebDAV Features
+ ---------------
! The ``davlib`` module will provide a mixin for sending WebDAV requests
! to a WebDAV-enabled server. This mixin (``davlib.DAVClient``) can be
! combined with the ``HTTPConnection`` and the ``HTTPSConnection`` classes
(the mixin may possibly work with the HTTP and HTTPS compatibility
classes, but that is not a requirement).
***************
*** 175,179 ****
defined by HTTP in RFC 2616, and by WebDAV in RFC 2518.
! A custom response object is used to decode 207 (Multi-Status)
responses. The response object will use the standard library's xml
package to parse the multistatus XML information, producing a
--- 182,186 ----
defined by HTTP in RFC 2616, and by WebDAV in RFC 2518.
! A custom response object is used to decode ``207 (Multi-Status)``
responses. The response object will use the standard library's xml
package to parse the multistatus XML information, producing a
***************
*** 183,205 ****
Reference Implementation
The actual (future/final) implementation is being developed in the
! /nondist/sandbox/Lib directory, until it is accepted and moved
into the main Lib directory.
References
! [1] http://www.webdav.org/
Copyright
! This document has been placed in the public domain.
! Local Variables:
! mode: indented-text
! indent-tabs-mode: nil
! End:
--- 190,218 ----
Reference Implementation
+ ========================
The actual (future/final) implementation is being developed in the
! ``/nondist/sandbox/Lib`` directory, until it is accepted and moved
into the main Lib directory.
References
+ ==========
! .. _WebDAV: http://www.webdav.org/
Copyright
+ =========
! This document has been placed in the public domain.
! ..
! Local Variables:
! mode: indented-text
! indent-tabs-mode: nil
! fill-column: 70
! sentence-end-double-space: t
! End: