You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Gosling <jo...@realneedsoftware.co.uk> on 2007/05/18 15:57:00 UTC

[users@httpd] GET requests being changed to POST

Hi,

We have a web application which had been running unproblematically for 
around 6 years until several days ago (approximately 10th May).  At this 
time we suddenly found that requests sent via POST were intermittently 
showing up as GET requests in the Apache access logs.  On each such occasion 
(around 10% of requests)  the application would fail as a consequence with 
none of the POSTed data reaching our scripts. On the remaining 90% of 
occasions the POST request were getting transmitted successfully.

To see if this was just a local problem, we switched the application to 
another server at a different ISP but still the same happened.  We then 
rewrote the application as an embedded Flash application rather than 
traditional HTML forms, but the same continued to happen.

The problem is occurring for users at a variety of locations in different 
organisations so is not specific to any particular organisational hardware 
or software configuration.  Absolutely nothing has changed at our end so we 
suspect that a software update of some kind, either at the browser end or at 
the server end, is the cause.  In the HTML version of the application (a 23 
page questionnaire), users are able to submit some pages but other pages 
fail, suggesting an interaction between whatever is at the root of the 
problem and the specific data posted (strings of digits with occasional 
typed comments).  We first suspected the recent autoupdate of IE on 8th of 
May but so far we have heard of no similar problems from other users.  So 
the next possibility is a recent Apache update.  I'm no expert on Apache so 
I'm wondering if anyone can offer some ideas.

Specifically:

(a) has their been a recent update of Apache or related software over the 
last 10 days which could possibly have caused this problem?

and

(b) does anyone have any idea of what sort of process could alter a POST 
request from a browser in such a manner as it finishes up as a GET request 
without any posted data by the time it reaches a CGI scripts?  Incidentally, 
on this point, we are pretty certain that the form is not broken in any way 
and submits a valid POST request.

Any information would be greatly appreciated.


John G 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET requests being changed to POST

Posted by John Gosling <jo...@realneedsoftware.co.uk>.
That's extremely helpful to know Joshua.  If what you say is true, that the METHOD shown access log is an exact copy of what is sent by the client (and by implication can't have been modified in any way by Apache), then that effectively rules out problems at the server end.  The examples I sent you were all associated with failures of the application to receive data.  In other words, every time the application fails to receive data, we get a log entry such the examples I gave and we are getting no 300 errors for this application.

So this seems to mean that although our application within the client is sending via POST, whether by simple HTML forms or via an embedded Flash application, the browser is sending it on as GET.  And as I mentioned in the original post, I'm pretty sure our application isn't getting broken as I have been spending the last few days trying as hard as I can to break it with various combinations of data.

I think this means that I have to go back to investigating the IE autoupdate which came out a couple of days before the problems began.  Though I would still welcome comments from anyone in the list who has further ideas about this - either at the server end or the browser end.

Thanks

John
  ----- Original Message ----- 
  From: Joshua Slive 
  To: users@httpd.apache.org ; John Gosling 
  Sent: Friday, May 18, 2007 4:42 PM
  Subject: Re: [users@httpd] GET requests being changed to POST


  On 5/18/07, John Gosling <jo...@realneedsoftware.co.uk> wrote:
  > In all cases, the
  > request was sent as POST.

  No, what you see in the access_log is an exact copy of the request
  line sent from the client. So the client is sending GET. That still
  leaves the question: why?

  What you need to look at is the sequence of requests from the same
  client leading up to this problem request. Check to see if there is a
  POST request with a 3xx response.

  Joshua.

Re: [users@httpd] GET requests being changed to POST

Posted by Joshua Slive <jo...@slive.ca>.
On 5/18/07, John Gosling <jo...@realneedsoftware.co.uk> wrote:
> In all cases, the
> request was sent as POST.

No, what you see in the access_log is an exact copy of the request
line sent from the client. So the client is sending GET. That still
leaves the question: why?

What you need to look at is the sequence of requests from the same
client leading up to this problem request. Check to see if there is a
POST request with a 3xx response.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET requests being changed to POST

Posted by John Gosling <jo...@realneedsoftware.co.uk>.
Thanks for the reply Joshua.

Firstly your quite right.  The title is the wrong way round.  Apologies - 
it's been a hard day !!

Secondly, I should explain that I am a web developer and not a server 
administrator so I don't have access to very much except to the access logs 
at our ISP. I'm simply trying to see whether Apache is the cause of the 
problem and whether we can find a workaround to whatever is causing it.

As regards the logs, I have posted some extracts below (with IP No. and date 
removed to make them more readable).  In the case of the first four, the 
response size of 1483 is simply our "Thank You" page following final 
submission.  In fact no data was received from these submissions.  In case 
of the last two, it was for a short error message following lack of received 
data.  In the majority of cases though, we have identical records in the 
logs which are showing as POST and where there was successful transmission 
of data.  Each of the codes below has a 200 response !  In all cases, the 
request was sent as POST.

John

"GET /cgi-bin/response.pl HTTP/1.1" 200 1483 "-" "Mozilla/4.0 (compatible; 
MSIE 6.0; Windows NT 5.1; SV1)"
"GET /cgi-bin/response.pl HTTP/1.1" 200 1483 "-" "Mozilla/4.0 (compatible; 
MSIE 6.0; Windows NT 5.1; SV1)"
"GET /cgi-bin/response.pl HTTP/1.1" 200 1483 
"http://www.teamfocus.co.uk/cgi-bin/quest.pl" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.0)"
"GET /cgi-bin/response.pl HTTP/1.1" 200 1483 
"http://www.teamfocus.co.uk/cgi-bin/quest.pl" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.0)"
"GET /cgi-bin/quest.pl HTTP/1.1" 200 62 
"http://www.teamfocus.co.uk/cgi-bin/quest.pl" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.0)"
"GET /cgi-bin/quest.pl HTTP/1.1" 200 62 
"http://www.teamfocus.co.uk/cgi-bin/quest.pl" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
"GET /cgi-bin/quest.pl HTTP/1.1" 200 62 "-" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.1; SV1)"




----- Original Message ----- 
From: Joshua Slive
To: users@httpd.apache.org ; John Gosling
Sent: Friday, May 18, 2007 4:02 PM
Subject: Re: [users@httpd] GET requests being changed to POST


On 5/18/07, John Gosling <jo...@realneedsoftware.co.uk> wrote:
> Hi,
>
> We have a web application which had been running unproblematically for
> around 6 years until several days ago (approximately 10th May).  At this
> time we suddenly found that requests sent via POST were intermittently
> showing up as GET requests in the Apache access logs.  On each such 
> occasion
> (around 10% of requests)  the application would fail as a consequence with
> none of the POSTed data reaching our scripts. On the remaining 90% of
> occasions the POST request were getting transmitted successfully.

So your subject line is backwards.

> (a) has their been a recent update of Apache or related software over the
> last 10 days which could possibly have caused this problem?

No. And in any case Apache doesn't auto-update, so it would need to be
the result of you specifically changing something in apache.

>
> (b) does anyone have any idea of what sort of process could alter a POST
> request from a browser in such a manner as it finishes up as a GET request
> without any posted data by the time it reaches a CGI scripts? 
> Incidentally,
> on this point, we are pretty certain that the form is not broken in any 
> way
> and submits a valid POST request.

The most common reason for a POST to change to a GET is that the POST
is redirected. Check your logs for 3xx response codes and figure out
what is generating them.

It isn't clear if you are actually seeing GET or POST in your
access_log. Perhaps you can show us some of the contents of the
access_log.

In the worse case, you should trace exactly what is getting sent back
and forth to apache using something on the wire or something like
mod_dumpio:
http://httpd.apache.org/docs/2.2/mod/mod_dumpio.html

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] GET requests being changed to POST

Posted by Joshua Slive <jo...@slive.ca>.
On 5/18/07, John Gosling <jo...@realneedsoftware.co.uk> wrote:
> Hi,
>
> We have a web application which had been running unproblematically for
> around 6 years until several days ago (approximately 10th May).  At this
> time we suddenly found that requests sent via POST were intermittently
> showing up as GET requests in the Apache access logs.  On each such occasion
> (around 10% of requests)  the application would fail as a consequence with
> none of the POSTed data reaching our scripts. On the remaining 90% of
> occasions the POST request were getting transmitted successfully.

So your subject line is backwards.

> (a) has their been a recent update of Apache or related software over the
> last 10 days which could possibly have caused this problem?

No. And in any case Apache doesn't auto-update, so it would need to be
the result of you specifically changing something in apache.

>
> (b) does anyone have any idea of what sort of process could alter a POST
> request from a browser in such a manner as it finishes up as a GET request
> without any posted data by the time it reaches a CGI scripts?  Incidentally,
> on this point, we are pretty certain that the form is not broken in any way
> and submits a valid POST request.

The most common reason for a POST to change to a GET is that the POST
is redirected. Check your logs for 3xx response codes and figure out
what is generating them.

It isn't clear if you are actually seeing GET or POST in your
access_log. Perhaps you can show us some of the contents of the
access_log.

In the worse case, you should trace exactly what is getting sent back
and forth to apache using something on the wire or something like
mod_dumpio:
http://httpd.apache.org/docs/2.2/mod/mod_dumpio.html

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org