Ah, but the problem is 100% client side. Apache httpclient's
DefaultHttpClient has this problem with HTTP 1.0. At least the android
version of it.
A network dump showed that the client simply delayed for two seconds
between sending the headers and sending the body.
http://stackoverflow.com/questions/3046424/http-post-requests-using-httpclient-take-2-seconds-why
regards,
//Martin
On Sun, Mar 27, 2011 at 7:00 PM, Oleksiy Stashok
<oleksiy.stashok_at_oracle.com> wrote:
> Hi Martin,
>
> is it possible for you to provide a testcase for us, it would be interesting
> to see why HTTP 1.0 caused the problem.
>
> Thanks.
>
> Alexey.
>
> On 03/25/2011 04:51 PM, Martin Bruse wrote:
>>
>> I found the problem, and it was on the client side. The client was a
>> DefaultHttpClient, and it was using HTTP 1.0. Problems was solved when
>> I told it to use HTTP 1.1.
>>
>> Cheers,
>> //Martin
>>
>> On Sat, Mar 26, 2011 at 12:25 AM, Martin Bruse<zondolfin_at_gmail.com>
>> wrote:
>>>
>>> Hello list!
>>>
>>> I am trying to embed a small web server in my application using
>>> GrizzlyWebServer.
>>>
>>> But when I try to get the body of a POST to my server, something
>>> strange happens: The moment I first call "read(byte[], int, int)" on
>>> the InputStream I get from GrizzlyRequest.getInputStream() there is a
>>> strange two second delay. Always two seconds, as well.
>>>
>>> Does anyone have any idea why this happens? What could cause a delay
>>> that long, and always two seconds?
>>>
>>> Please, I am completely confounded...
>>>
>>> regards,
>>> //Martin
>>>
>
>