Re: how to receive a Http message on a socket ?
- From: jasen <jasen@xxxxxxxxxxx>
- Date: 9 Feb 2007 11:54:35 GMT
On 2007-02-09, kant <sasi@xxxxxxxx> wrote:
Hi all,
I'm trying to learn something more about sockets because
I need to receive a HTTP message on a socket: I'm listening
on a port (let's say 8080) and the browser sees me as its
proxy. When it requires a page, I'd like to receive the entire
HTTP Request. I wrote the following, but - I don't know why -
it doesn't seem to work.
I hope anyone more experienced than me will help me,
because I really need this feature, it's quite urgent.
I'm trying my best but I think that sometimes the best
way to learn is to have some examples of codes..After all
it shouldn't be so unusual to receive a HTTP Request on a
socket .. I mean it should be a standard action for those
who program distributed applications. Please help.
This is the code I'm using:
#define PROXY_PORT 8080
#define MAXLENGTH 10000
longest HTTP requset I've ever seen was 800K, no I lie I did 1.2M once
if files are being uploaded it could be even longer....
are you reading the header of the request correctly?
--
Bye.
Jasen
.
- Follow-Ups:
- References:
- how to receive a Http message on a socket ?
- From: kant
- how to receive a Http message on a socket ?
- Prev by Date: Re: process to multi-process communication mechanism needed
- Next by Date: Re: how to receive a Http message on a socket ?
- Previous by thread: how to receive a Http message on a socket ?
- Next by thread: Re: how to receive a Http message on a socket ?
- Index(es):
Relevant Pages
|