From your logs, one can see that the POST request to Apache is answered 
with a redirect (301) to http://localhost:889/register/ and that's why 
there is a second request to the same URL with GET. That second one 
makes it through Apache and gets to Resin which answers it.
So, it is Apache that is answering the first POST request with a 
redirect. Resin never gets to see the POST request.

I would check the Apache configuration to look for rewrite rules etc. 
that would make that happen.

S!
D.

Wesley Wu escribió:
> that GET was the subsequent redirect after the POST.
> 
> I use redirect after post pattern.
> 
> A request first POST to "/register" and after some processing,
> redirect to "/register" again using a GET request.
> 
> -Wesley
> 
> 2009/12/3 Scott Ferguson <f...@caucho.com>:
>> Wesley Wu wrote:
>>> I changed my post url to "/register1" instead or "/register" and the
>>> post request was handled properly.
>>>
>>> So I think a request to the url "/register" will be always treated as "GET"?
>>>
>> Resin doesn't have any special URL like /register (except the servlet
>> j_*). Is there something in the Apache end which is redirecting, or
>> changing it, like a filter?
>>
>>  From the log you sent earlier, it was the front end (Apache) that's
>> sending the GET. (There's a log entry for the HTTP method parsing.)
>>
>> -- Scott
>>> I scanned the apache log, and the post request was logged correct:
>>>
>>> localhost 127.0.0.1 - - [03/Dec/2009:08:18:21 +0800] "POST /register
>>> HTTP/1.1" 301 346 "http://localhost:889/register/"; "Mozilla/5.0
>>> (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.1.5) Gecko/20091102
>>> Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729)" 1000
>>> localhost 127.0.0.1 - - [03/Dec/2009:08:18:21 +0800] "GET /register/
>>> HTTP/1.1" 200 9174 "http://localhost:889/register/"; "Mozilla/5.0
>>> (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.1.5) Gecko/20091102
>>> Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729)" 77000
>>>
>>> But when I looked into resin's access log, I was shocked.
>>> I found no access log item in it, only the subsequent redirected items:
>>>
>>> 127.0.0.1 - - [03/Dec/2009:08:18:21 +0800] "GET /register/ HTTP/1.1"
>>> 200 8707 "http://localhost:889/register/"; "Mozilla/5.0 (Windows; U;
>>> Windows NT 6.0; zh-CN; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB6
>>> (.NET CLR 3.5.30729)"
>>> 127.0.0.1 - - [03/Dec/2009:08:18:21 +0800] "GET /css/common.css
>>> HTTP/1.1" 304 - "http://localhost:889/register/"; "Mozilla/5.0
>>> (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.1.5) Gecko/20091102
>>> Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729)"
>>> 127.0.0.1 - - [03/Dec/2009:08:18:21 +0800] "GET /js/humanmessage.js
>>> HTTP/1.1" 304 - "http://localhost:889/register/"; "Mozilla/5.0
>>> (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.1.5) Gecko/20091102
>>> Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729)"
>>> 127.0.0.1 - - [03/Dec/2009:08:18:21 +0800] "GET /css/style05.css
>>> HTTP/1.1" 304 - "http://localhost:889/register/"; "Mozilla/5.0
>>> (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.1.5) Gecko/20091102
>>> Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729)"
>>>
>>>
>>>
>>> -Wesley


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to