M
marcwentink
Dear People,
I do not know if alt.html is really the good groep for asking something
about http, but here is my question:
How can I send information from the browser to a simple socket
listener?
I am writing a program that listens on port 3456 and receives a http
request. In my browser I call http://localhost:3456/test.
In my C++ program, that listens on port 3456, I receive this request
in:
nRet = recv(new_socket, szBuf, BUF_SZ, 0);
Then in szBuf I can see a lot of things and information about the call,
but not the "test" string.
This is the information I get in szBuf:
---------------------------
PROG_NAME
---------------------------
GET /test HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/x-shockwave-flash, */*
Accept-Language: nl
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.1.4322)
Host: localhost:3456
Connection: Keep-Alive
I do not know if alt.html is really the good groep for asking something
about http, but here is my question:
How can I send information from the browser to a simple socket
listener?
I am writing a program that listens on port 3456 and receives a http
request. In my browser I call http://localhost:3456/test.
In my C++ program, that listens on port 3456, I receive this request
in:
nRet = recv(new_socket, szBuf, BUF_SZ, 0);
Then in szBuf I can see a lot of things and information about the call,
but not the "test" string.
This is the information I get in szBuf:
---------------------------
PROG_NAME
---------------------------
GET /test HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, application/x-shockwave-flash, */*
Accept-Language: nl
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.1.4322)
Host: localhost:3456
Connection: Keep-Alive