Re: minimal httpd response
From: xbunny (xbunny_at_eidosnet.co.uk)
Date: 02/24/04
- Next message: Joe \: "Re: Gerry Quinn: Legend in his own mind ( Re: Dijkstra gets it wrong [was: Re: D gets it right] )"
- Previous message: Programmer Dude: "Re: XOR using NAND"
- In reply to: Martijn: "Re: minimal httpd response"
- Next in thread: Michael Wojcik: "Re: minimal httpd response"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Feb 2004 22:35:29 +0000
Martijn wrote:
>>>>The point is, when I use direct telnet, everything works fine, but
>>>>when I use links, it chokes and tells me the following:
>>>
>>>
>>>> Alert!: Unexpected network read error; connection aborted.
>>>> Can't Access `http://www.xxxxxxx.nl:12000/index.html'
>>>> Alert!: Unable to access document.
>>>>
>>>> lynx: Can't access startfile
>>>>
>>>
>>>I built a toy httpd server once and alot of browsers got PO'd if I
>>>closesocket the connection after sending the headers. They wanted the
>>>socket to linger. Perhaps that is your culprit?
>>>
>>
>>I should qualify that some more, linger is an option you set on the
>>socket, you should still closesocket of course. Forgive me it was a long
>>time ago...
>
>
> Hmmm, I honestly don't know where to look for this one. Check the man pages
> for some of the commands I use (in C), but haven't found anything. Any
> pointers?
>
> Thanks again,
>
I know its microsoft but this probably tells it better than I can
(though I guess from the man ref your using unix in which case
closesocket is just close). Basically the problem I had which looks like
yours (ie telnet looks good, browser not happy) was due to not closing
the socket gracefully.
Possibly man setsockopt (look for the section on SO_LINGER), shutdown
and close might help.
Incidentally I found netscape (maybe mozilla now) really handy for
debugging since if you send it back a screwy http response it just
displays it as text!
- Next message: Joe \: "Re: Gerry Quinn: Legend in his own mind ( Re: Dijkstra gets it wrong [was: Re: D gets it right] )"
- Previous message: Programmer Dude: "Re: XOR using NAND"
- In reply to: Martijn: "Re: minimal httpd response"
- Next in thread: Michael Wojcik: "Re: minimal httpd response"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|