Source Remarks The request
GET
http :// user : password @ servername : port /script_path / path_info ; path_parameters ? query_string # fragment
HTTP/1.1
Python urlparse.urlparse


0 : scheme
1 : netloc 2 : path
3 : parameters
4 : query
5 : fragment

urlparse.urlsplit


0 : scheme
1 : netloc 2 : path_and_parameters
3 : query
4 : fragment

HTTP Headers




Authorization
Host












Apache Configuration Directive Used for SERVER_NAME and SERVER_PORT if UseCanonicalName is On







ServerName
Port










Environment variables Standard CGI environment variables
REQUEST_METHOD


REMOTE_USER




SERVER_PORT SCRIPT_NAME PATH_INFO


QUERY_STRING


SERVER_PROTOCOL
HTTP headers environment variable








HTTP_HOST












Apache extra environment variables Depends on the value of the UseCanonicalName directive.







SERVER_NAME












SSL environment variables


HTTPS


















mod_rewrite environment variables Those variables seems to be available only in rewrite conditions and rules, and not available to mod_python

SCRIPT_URI
















SCRIPT_URL







REQUEST_URI (if the client sent an absolute URL)












REQUEST_URI (if the client sent a relative URL)

THE_REQUEST
The HTTPS environment variable is also provided by mod_rewrite, even if mod_ssl is absent.

HTTPS


















Those variables are made available to mod_python after the redirect is done, and contain information about the request before the redirect is done.










REDIRECT_URL


REDIRECT_QUERY_STRING



mod_python Request object
req.method






req.hostname


req.path_info


req.args


req.protocol
req.get_basic_auth() is only valid for Basic authtication. The documentation says that it must be called before req.user is valid.



req.user
req.get_basic_auth_pw()















req.the_request



req.unparsed_uri (if the client sent an absolute URL)













req.unparsed_uri (if the client sent a relative URL)













req.uri







Server object








server.server_hostname












Connection object connection.local_addr[0] is the IP address of the server on which the request has been received ; usually it's not the server name we need.







connection.local_addr[0]
connection.local_addr[1]










Apache API
TODO





















Revision information :