Manlio P. ha scritto:
buffer only, two times.
I have tested this case with a buffer size of 16 bytes.
I have attached the output produced by nginx (and received by wget).
And here is an strace:
writev(7, [{“HTTP/1.1 200 OK\r\nDate: Tue, 09 Oct 2007 10:51:08
GMT\r\nContent-Type: text/plain\r\nTransfer-Encoding:
chunked\r\nConnection: keep-alive\r\nServer: Test-read\r\nX-Powered-By:
Python\r\nDate: \r\n\r\n”, 183}, {“10\r\n”, 4},
{"\0\0\0\0\34\265\f\10)\0\0\0\t\0\0\0", 16}, {"\r\n", 2}, {“10\r\n”, 4},
{"\0\0\0\0\34\265\f\10)\0\0\0\t\0\0\0", 16}, {"\r\n", 2}, {“0\r\n\r\n”,
5}], 8) = 232
writev(7, [{“HTTP/1.1 500 Internal Server Error\r\nDate: Tue, 09 Oct
2007 10:51:08 GMT\r\nContent-Type: text/html\r\nContent-Length:
193\r\nTransfer-Encoding: chunked\r\nConnection: close\r\nServer:
Test-read\r\nX-Powered-By: Python\r\nDate: \r\n\r\n”, 217}, {“c1\r\n”,
4}, {"\r\n500 Internal Server
Error\r\n<body bgcolor=“white”>\r\n
500
Internal Server Error
\r\n", 140},
{“
nginx/0.5.31\r\n\r\n\r\n”, 53},
{"\r\n0\r\n\r\n", 7}], 5) = 421
nginx sends the headers two times…
Regards Manlio P.