[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP - IHTTPRequest.py:1.1.2.1 HTTPRequest.py:1.1.2.18
Jim Fulton
jim@zope.com
Fri, 18 Jan 2002 15:46:15 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/HTTP
In directory cvs.zope.org:/tmp/cvs-serv20880
Modified Files:
Tag: Zope-3x-branch
HTTPRequest.py
Added Files:
Tag: Zope-3x-branch
IHTTPRequest.py
Log Message:
Juan David Ibenez Palomar and Jim
Added a beginning at an HTTP Request interface, which we needed for
a request adapter, and added the interface assertion to HTTPRequst.
=== Added File Zope3/lib/python/Zope/Publisher/HTTP/IHTTPRequest.py ===
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
"""
Revision information: $Id: IHTTPRequest.py,v 1.1.2.1 2002/01/18 20:46:15 jim Exp $
"""
from Interface import Interface
class IHTTPRequest(Interface):
def __getitem__(key):
"""Return HTTP request data
Request data are divided into five categories:
- Environment variables
These variables include input headers, server data, and other
request-related data. The variable names are as <a
href="http://hoohoo.ncsa.uiuc.edu/cgi/env.html">specified</a>
in the <a
href="http://hoohoo.ncsa.uiuc.edu/cgi/interface.html">CGI
specification</a>
- Form data
These are data extracted from either a URL-encoded query
string or body, if present.
- Cookies
These are the cookie data, if present.
- Lazy Data
These are callables which are deferred until explicitly
referenced, at which point they are resolved and stored as
application data.
- Other
Data that may be set by an application object.
"""
=== Zope3/lib/python/Zope/Publisher/HTTP/HTTPRequest.py 1.1.2.17 => 1.1.2.18 ===
from cgi_names import isCGI_NAME, hide_key
from IHTTPCredentials import IHTTPCredentials
-
+from IHTTPRequest import IHTTPRequest
DEFAULT_PORTS = {'http': '80', 'https': '443'}
STAGGER_RETRIES = 1
@@ -77,7 +77,7 @@
other variables, form data, and then cookies.
"""
- __implements__ = BaseRequest.__implements__, IHTTPCredentials
+ __implements__ = BaseRequest.__implements__, IHTTPCredentials, IHTTPRequest
_auth = None # The value of the HTTP_AUTHORIZATION header.