Headers as reported by tcpick, with address, host, referrer and cookie asterisked:<br><br>1 SYN-SENT x.108.161.x:62793 > 10.144.11.241:http<br>1 SYN-RECEIVED x.108.161.x:62793 > 10.144.11.241:http<br>
1 ESTABLISHED x.108.161.x:62793 > 10.144.11.241:http<br>GET /1/****** HTTP/1.1<br>Host: ****.*******.com<br>User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20100101 Firefox/16.0<br>Accept: */*<br>
Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Connection: keep-alive<br>Referer: http://****.*******.com/*******<br>Cookie: ******<br><br>HTTP/1.1 200 OK<br>Transfer-Encoding: chunked<br>Date: Sat, 24 Nov 2012 18:45:49 GMT<br>
<br>5d4dd<br>jsonpCallback([...<br><br><br>Thanks,<br><br>Alec<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 24, 2012 at 8:52 AM, Dmitry Kolesnikov <span dir="ltr"><<a href="mailto:dmkolesnikov@gmail.com" target="_blank">dmkolesnikov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hello,</div><div><br></div><div>Could you please share HTTP headers for request and response?</div>
<div><br></div><div>- Dmitry</div><br><div><div>On Nov 24, 2012, at 2:09 AM, Max Lapshin <<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>> wrote:</div><br><blockquote type="cite">Nobody have replied to you yet.<div>
<br></div><div>It is a very strange issue. Show your full reply headers. Do you have Content-Length in them?<span></span><br><br>On Wednesday, November 21, 2012, Alec Mocatta wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've got a simple http server running, with gen_tcp options as follows:<br><br>
[<br><span style="white-space:pre-wrap"> </span>binary,<br><span style="white-space:pre-wrap"> </span>{active, false},<br><span style="white-space:pre-wrap"> </span>{packet, http_bin},<br><span style="white-space:pre-wrap"> </span>{reuseaddr, true},<br>
<span style="white-space:pre-wrap"> </span>{keepalive, true},<br><span style="white-space:pre-wrap"> </span>{delay_send, false},<br><span style="white-space:pre-wrap"> </span>{nodelay, true}<br>]<br><br>With
one response in particular that sends a single 300000 byte http chunk
with a single gen_tcp:send call, I'm seeing some clients failing to
receive it, or only receiving the first 150000 - 250000 bytes.<br>
<br>Firefox, Chrome and Cocoa's NSURLConnection all have problems while
receiving the response, with Firefox and NSURLConnection truncating the
response, and Chrome not accepting it at all and giving an error. Curl
and wget however receive the response fine.<br>
<br>tcpick -C -yP "tcp port 80" shows the connection being closed before
all the data's sent, printing the data truncated at the same place as
Firefox, followed by:<br>1 FIN-WAIT-2 x.108.161.x:65438 > 10.144.11.241:http<br>
1 TIME-WAIT x.108.161.x:65438 > 10.144.11.241:http<br>1 CLOSED x.108.161.x:65438 > 10.144.11.241:http<br><br>Setting sndbuf to 512000 however seems to solve the problem, at least for the 300000 byte chunk size I'm sending.<br>
<br>Why would sndbuf affect the validity of the TCP/HTTP stream? Someone
suggested this looks like the return value of write(2) isn't being
checked, or EAGAIN isn't being dealt with correctly? gen_tcp:send is
returning ok, however.<br>
<br>
Erlang version: Erlang R15B02 (erts-5.9.2) [source] [64-bit] [async-threads:0] [hipe] [kernel-poll:true]<br><br>Any ideas what could be causing this?<br><br>Thanks,<br><br>Alec
</blockquote></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div></blockquote></div><br></div>