tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: POST data lost when switching URL using mod_rewrite and mod_jk
Date Thu, 06 Sep 2007 14:34:37 GMT
Example from

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

10.3.2 301 Moved Permanently

The requested resource has been assigned a new permanent URI and any 
future references to this resource SHOULD use one of the returned URIs. 
Clients with link editing capabilities ought to automatically re-link 
references to the Request-URI to one or more of the new references 
returned by the server, where possible. This response is cacheable 
unless indicated otherwise.

The new permanent URI SHOULD be given by the Location field in the 
response. Unless the request method was HEAD, the entity of the response 
SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

If the 301 status code is received in response to a request other than 
GET or HEAD, the user agent MUST NOT automatically redirect the request 
unless it can be confirmed by the user, since this might change the 
conditions under which the request was issued.

       Note: When automatically redirecting a POST request after
       receiving a 301 status code, some existing HTTP/1.0 user agents
       will erroneously change it into a GET request.

So if you are using HTTp Redirect, check your Apache access log. It's 
likely you will notice, that the browser switched from a POST to a GET 
during the redirect and the POST Body isn't send by the Browser. Nothing 
we could do in this case on the server side.

You should try to identify a GET which sits before the POST in your 
clickstream and do the redirect already there (like e.g. when the 
browser tries to retrieve the empty form before it tries to send the 
contents).

Regards,

Rainer

Michael Böckling wrote:
> Hi folks!
> 
> I Have the following setup:
> 
> Apache/2.2.4 
> mod_ssl/2.2.4 
> mod_jk/1.2.25
> mod_rewrite (?)
> Apache Tomcat 5.5.23
> 
> Browser ==> Apache + mod_rewrite ==> mod_jk ==> Tomcat
> 
> 
> This is a Linux machine, and mod_rewrite is used to switch to SSL on certain URLs.
> 
> Problem: the POST data is lost whenever a form on a http page sends data to a page that
gets its URL rewritten to https.
> This goes as folllows:
> 
> http page => form post to http url => rewrite url to https, switch to SSL =>
display https url
> 
> No data arrives when using POST!
> I know there is a bug that limits the maximum post size to x KB, but in my case, the
post data is a just a few text fields.
> Any idea as to why this happens?
> 
> Regards,
> 
> 
> Michael

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message