You are here: Question about http request content « HTML « IT news, forums, messages
Question about http request content

Posted by marcwentink@hotmail.com on 12/22/05 11:33

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

---------------------------
OK
---------------------------

How can I send information from the browser to this socket listener,
which is not a full webserver, just window socket in a CPP program??
Where is the string "test" gone?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация