[Zope] From POST to GET

Dieter Maurer dieter@handshake.de
Tue, 6 Mar 2001 21:10:09 +0100 (CET)


Peter Bengtsson writes:
 > Problem is this.
 > I POST a form to a page called process_html.
 > 
 > Inside process I do some validation on posted variables.
 > If i find that something is wrong I want to complain by sending the user to
 > bad_input_html?errmsg=Username%20Empty (which is a GET request in theory).
 > What happens is that the redirect is a mix of GET and POST. It is a pure
 > POST request, but the querystring is picked up as well.
If the browser uses HTTP 1.1, then you may use the new
HTTP 1.1 response code that allows you to specify unmistakenly
that you want the redirection be handled as a GET request.
HTTP/1.0 browsers, however, will not understand these response
codes.

I think, "REQUEST.environ['SERVER_PROTOCOL']" will tell you,
what HTTP version is used.


Dieter