minimal httpd response
From: Martijn (subscription_remove_101_at_hot_remove_mail.com)
Date: 02/24/04
- Next message: Martijn: "Re: OOP"
- Previous message: Nils Petter Vaskinn: "Re: OOP"
- Next in thread: xbunny: "Re: minimal httpd response"
- Reply: xbunny: "Re: minimal httpd response"
- Maybe reply: Michael Wojcik: "Re: minimal httpd response"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Feb 2004 15:49:06 +0100
Hi,
I hope I am in the right place for this. I am trying to write a simple
HTTPD server (as an exercise for school), but I have some trouble getting it
to work. The point is, when I use direct telnet, everything works fine, but
when I use links, it chokes and tells me the following:
Looking up proxy.xxxxxxx.nl:3128
proxy.xxxxxxx.nl:3128
Making HTTP connection to proxy.xxxxxxx.nl:3128
Sending HTTP request.
HTTP request sent; waiting for response.
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 put my server into debug mode to see what exactly was send by Lynx and
tried to do the same using telnet. The result is shown below (the lines I
pasted are marked with a > ). Everything seems to be working fine, but I
got the feeling I am not sending all of the required headers.
Does anybody know which are the minimal set of required headers? Or am I
overlooking something else? May the proxy be messing things up here?
Thanks in advance!
$ telnet localhost 12000
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
> GET /index.html HTTP/1.0
> Accept: text/html, text/plain, audio/mod, image/*, video/mpeg,
video/*, application/pgp, application/pdf, application/postscript,
message/partial, message/external-body, x-be2,
application/andrew-inset, text/richtext, text/enriched,
x-sun-attachment
> Accept: audio-file, postscript-file, default, mail-file,
sun-deskset-message, application/x-metamail-patch,
application/msword, text/sgml, */*;q=0.01
> Accept-Encoding: gzip, compress
> Accept-Language: en
> User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1
OpenSSL/0.9.6b
> Via: 1.0 proxy1:3128 (Squid/2.4.STABLE7)
> X-Forwarded-For: xxx.xxx.xxx.xxx
> Host: www.xxxxxxx.nl:12000
> Cache-Control: max-age=259200
> Connection: keep-alive
>
HTTP/1.0 200 OK
Content-Length: 8
Content-Type: text/html
test
Connection closed by foreign host.
-- Martijn http://www.sereneconcepts.nl
- Next message: Martijn: "Re: OOP"
- Previous message: Nils Petter Vaskinn: "Re: OOP"
- Next in thread: xbunny: "Re: minimal httpd response"
- Reply: xbunny: "Re: minimal httpd response"
- Maybe reply: Michael Wojcik: "Re: minimal httpd response"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|