You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "E.Bruch" <be...@web.de> on 2003/02/03 16:19:15 UTC
[users@httpd] apache returns 0 bytes
Hello, can anybody help with the problem below?
If running a http-client and apache in the same local network or on the same
computer we experience a problem with the code:
char req[] = "GET / HTTP/1.1\r\nHost: localhost:180\r\nAccept:\
text/html,text/xml\r\n\r\n"
struct sockaddr_in apache_addr
...
connect(sock, (sockaddr*)&apache_addr,sizeof(apache_addr));
...
send(sock, req, strlen(req));
shutdown(sock, 1); // no further sends
recv(sock, ....);
recv returns 0 bytes read, apache err log contains no error information.
If one inserts a sleep(1) call between send and shutdown everything
works fine.
Am I doing anything wrong? If not and this is an Apache problem what
workaround could I use?
---------------------------------------------------------------------
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