Re: HTTP/1.0 response to HTTP/1.1 POST requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Fri, Jan 18, 2013 at 3:32 AM, Alex Leonhardt <alex.tuxx@xxxxxxxxx> wrote:
Hi All,

I'm seeing HTTP/1.0 response codes coming from Apache when the Request was a HTTP/1.1 - this only seems to be the case when it's a POST - is this a known issue ? Is there a way to force a HTTP/1.1 response to POST requests ?

Server version: Apache/2.2.3
Server built:   Nov 12 2012 08:48:46

The command I'm testing this with is :

curl -d @test.xml -v http://HOSTIP/testurl -H "Host: valid.host.header"

The response I get is :

> POST /testurl HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Accept: */*
> Host: valid.host.header
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.0 400 Bad Request
< Date: Thu, 17 Jan 2013 16:20:29 GMT
< Server: Apache/2.2.3 (CentOS)
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Expires: Mon, 26 Jul 1997 05:00:00 GMT
< Content-Length: 120
< Connection: close
< Content-Type: application/xml

Any help would be really appreciated.

Thanks
Alex

Apache is HTTP1.1 server by default. Except in a situations when it detects buggy browser, like of course some versions of MSIE that send the requests in HTTP1.1 protocol but expect a response in HTTP1.0, in which case Apache downgrades the response to HTTP1.0. Which means Apache detects the browser type in your curl request as one of those. Try setting the curl User-Agent to Mozilla lets say using -A or -H options and see how you go in that case.
 

--

| RHCE | Senior Systems Engineer | www.vcore.co | www.vsearchcloud.com |


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux