Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Question about http request content

Reply
Thread Tools

Question about http request content

 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      12-22-2005
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?

 
Reply With Quote
 
 
 
 
Mitja Trampus
Guest
Posts: n/a
 
      12-22-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> [...]
> 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);
>
> This is the information I get in szBuf:
>
> ---------------------------
> PROG_NAME
> ---------------------------
> GET /test HTTP/1.1 <=======
> [...]
>
> Where is the string "test" gone?


Look harder
 
Reply With Quote
 
 
 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      12-22-2005
Mitja:

> Look harder


Ai, ai, ai, you are right, I am blind

You mean it's after the GET, right?

GET /test

Thanks a lot! I really did /*not*/ see it, overlooked the message.

 
Reply With Quote
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      12-22-2005
Mitja:

> Look harder


Yeah, will I must say, now I see it too, and actually I feel a little
small, hiding between my console and my mouse, the screen is getting
bigger and bigger, and the letters "GET /test" look as big as those
letters in Los Angelos where they make those movies....

Yes I found it....

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugs: Content-Length not updated by reused urllib.request.Request/ has_header() case-sensitive Johannes Kleese Python 4 11-27-2012 11:24 PM
Re: Bugs: Content-Length not updated by reusedurllib.request.Request / has_header() case-sensitive Cameron Simpson Python 0 11-12-2012 10:59 PM
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Pre-Send Request Headers, Pre-Send Request Content =?Utf-8?B?S2V2aW4gQnVydG9u?= ASP .Net 0 12-31-2004 06:29 PM
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">? TheKeith HTML 20 10-29-2003 11:56 AM



Advertisments