zechis
asked on
HTTP request (C/WinSock) What am I doing wrong?
Hi all,
I am having trouble understanding why my HTTP request is not working properly. Basically, I connect to a server on port 80, and send the following request:
"GET / HTTP/1.1\r\n"
and then I get nothing. However, if I send the erroneous request:
"GET HTTP/1.1\r\n"
I get the expected response "HTTP/1.1 400 Bad Request ..."
Am I missing something? I have tried various combinations of extra request headers with no luck. Pointers/tips/useful websites are all appreciated!!
Thanks in advance to any expert!
I am having trouble understanding why my HTTP request is not working properly. Basically, I connect to a server on port 80, and send the following request:
"GET / HTTP/1.1\r\n"
and then I get nothing. However, if I send the erroneous request:
"GET HTTP/1.1\r\n"
I get the expected response "HTTP/1.1 400 Bad Request ..."
Am I missing something? I have tried various combinations of extra request headers with no luck. Pointers/tips/useful websites are all appreciated!!
Thanks in advance to any expert!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's all in there honest :-)
See section 4.1 Message Types - first couple of paragraphs.
See section 4.1 Message Types - first couple of paragraphs.
ASKER
Quick question though, how did you find this out? I read RFC 2068 backwards and forwards and don't remember seeing the double CRLF anywhere!