httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CS Imamu" <>
Subject [users@httpd] Why does a form POST generate a redirect (302) with GET?
Date Wed, 12 Dec 2007 18:32:17 GMT

I've developed a small Java web application that is running in an
environment using Apache Web server sitting in front of IBM Websphere.
We get the following behavior that we've traced to the Web server (so
it never even gets to Websphere):

The application allows the user to upload files to the server. I am
using Apache's file upload library, but that's not the issue. The
issue is described by the client in the following words:

"When we try to upload a large spreadsheet, we are getting a couple of
different errors but we are unable to determine the cause at this

The Web server appears to receive the POST request from the browser
and then sends a redirect (302) response to the browser. We don't know
why this is happening. This is causing the browser to either display
an error or to send the post request again as a GET request. The GET
request fails because the browser is putting the form data in the URI,
making it too big."

The form in question is a simple file upload form. It is structured
using post and multi-part. The symptom of the error is that a huge URL
appears in the browser after hitting submit, and the explanation is as
given above, i.e: the form is submitted using POST, Apache responds
with a 302, and then the browser resends the request using GET but now
the request URI is huge...

The application fails on the server because the URI is too long when
the browser sends it. Keep in mind, as the explanation above
indicates, my application is not generating this huge URL: I send the
form parameter using POST, and somehow things go wrong...

On Sun's Application Server which is not using Apache Web server, all
is well.The file is correctly and quiely uploaded...

Any ideas?

thanks very much in advance.

- Ahmed

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message