[Zope] query_string
Chris McDonough
chrism@digicool.com
Thu, 03 Feb 2000 23:27:21 -0500
Terry Kerr wrote:
>
> Hi,
>
> How can I set the query string for the response to a request. I want to
> rewrite the url with a querystring to particular requests.
> RESPONSE.setHeader('QUERY_STRING','blah') doesn't seem to work.
>
AFAIK the QUERY_STRING is only meaningful in the context of a request.
It identifies the method that is used to obtain the response as well as
the URL. It doesn't make any sense to try to change it in the response
because the client browser is just going to dump anything that comes
back in the response looking like
Query-String: foo
whereas it would actually *do* something if the response looked like:
WWW-Authenticate: Basic
Please correct me if I'm wrong.
Underneath is RFC spec for response header fields.
RFC 2068 HTTP/1.1 January 1997
6.2 Response Header Fields
The response-header fields allow the server to pass additional
information about the response which cannot be placed in the Status-
Line. These header fields give information about the server and about
further access to the resource identified by the Request-URI.
response-header = Age ; Section 14.6
| Location ; Section 14.30
| Proxy-Authenticate ; Section 14.33
| Public ; Section 14.35
| Retry-After ; Section 14.38
| Server ; Section 14.39
| Vary ; Section 14.43
| Warning ; Section 14.45
| WWW-Authenticate ; Section 14.46
Response-header field names can be extended reliably only in
combination with a change in the protocol version. However, new or
experimental header fields MAY be given the semantics of response-
header fields if all parties in the communication recognize them to
be response-header fields. Unrecognized header fields are treated as
entity-header fields.
--
Chris McDonough
Digital Creations, Inc.
Zope - http://www.zope.org