You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by lorenzo <l....@gmail.com> on 2006/11/14 18:20:48 UTC

[users@httpd] Problem with POST method

Hi all.
I'm sending a simple http POST request and the browser hangs waiting for 
a reply.

This is my test page

<html>
        <form action="/post.html" method="post">
                <input type="text" name="aaa"/>
                <input type="text" name="bbb"/>
                <input type="submit"/>
        </form>
</html>

I have this problem both with httpd-2.2.3 and 2.0.46.
I have no problems with GET requests.
KeepAlive is turned off.

If I turn KeepAlive on things are a little different: if I request the 
test page and quickly submit the form there is no problem. If I wait 
enough to make the connection time out the request remains pending.

I think this is too big to be an apache problem, so I suspect there is 
something in os/firewall configuration to fix.

Have you ever seen something like this? Do you have any ideas?


Thanks, Bye

Lorenzo



---------------------------------------------------------------------
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] Problem with POST method

Posted by lorenzo <l....@gmail.com>.
Steve Swift ha scritto:
> It is almost certainly an error to have the action of a form reference 
> a static webpage. At a guess, you are settinng the action to the same 
> static page that contained the form. That's bound to cause problems, 
> not least of which would be confusion!
> Every <FORM> that I've ever seen sets the action to a URL which runs a 
> script of some sort or another.  How else are you going to process the 
> input from the form?
Hi Steve,
thanks for the reply. I'm using this strange page because this is a 
small fragment of html code that reproduce the problem.
This java fragment can also be used to reproduce the problem

        URL url = new URL("http://xxxxxxxxx/default/post.jsp");
        HttpURLConnection con = (HttpURLConnection) url.openConnection();
        con.setRequestMethod("POST");
        con.connect();
        InputStream content = (InputStream)con.getContent();
        System.out.println(content);
        int c;
        while ((c = content.read()) != -1) {
            System.out.print((char)c);
        }

or a wget --post-data, ecc.
Anyway we have found that this depends on the port apache is running on 
and if the request came from outside the firewall rather than from the 
internal network. So it looks like is something due to the 
firewall/balancer or something else but we are still trying to 
understand what's happening.

If anybody knows of some firewall configuration that work at http level 
stopping post request (?) please let me know.
Or maybe there something else with a wrong configuration (maybe 
something with the balancer) that spit out something (we have some DUP 
packets in tcpdump, but no rst.

Ok, I just received a call from my colleague as they found that the 
provider enabled, unrequested, some kind of http blocking/inspection 
that caused the problem. Now should be ok.


Thanks, bye

Lorenzo


---------------------------------------------------------------------
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] Problem with POST method

Posted by Steve Swift <st...@gmail.com>.
It is almost certainly an error to have the action of a form reference a
static webpage. At a guess, you are settinng the action to the same static
page that contained the form. That's bound to cause problems, not least of
which would be confusion!
Every <FORM> that I've ever seen sets the action to a URL which runs a
script of some sort or another.  How else are you going to process the input
from the form?

On 14/11/06, lorenzo <l....@gmail.com> wrote:
>
>
> Hi all.
> I'm sending a simple http POST request and the browser hangs waiting for
> a reply.
>
> This is my test page
>
> <html>
>         <form action="/post.html" method="post">
>                 <input type="text" name="aaa"/>
>                 <input type="text" name="bbb"/>
>                 <input type="submit"/>
>         </form>
> </html>
>
> I have this problem both with httpd-2.2.3 and 2.0.46.
> I have no problems with GET requests.
> KeepAlive is turned off.
>
> If I turn KeepAlive on things are a little different: if I request the
> test page and quickly submit the form there is no problem. If I wait
> enough to make the connection time out the request remains pending.
>
> I think this is too big to be an apache problem, so I suspect there is
> something in os/firewall configuration to fix.
>
> Have you ever seen something like this? Do you have any ideas?
>
>
> Thanks, Bye
>
> Lorenzo
>
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Steve Swift
http://www.swiftys.org.uk