Re: telnet ok, HTTP not
Alexandros Papadopoulos <[email protected]> Tue, 19 Nov 2002 14:21:50 -0500
| Newsgroups | gmane.comp.djb.publicfile |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 19 November 2002 12:37, Clemens Fischer wrote: > Alexandros Papadopoulos <[email protected]>: > >> > Now, when I try to view my start page from another machine (lynx > >> > 123.123.123.123:55555), I get a fast 404 not found error from > >> > publicfile. > > > > Then it wouldn't display any page, would it? It establishes the > > connection, but publicfile spits a 404 error. > > what do the logs say? if they aren't enough, you could use recordio > to find out what actually goes over the wire, as well as tcpdump. > then you might try another browser: lynx sends HTTP/1.0 AFAIK, and > other browsers allow 1.1. Using ethereal I see a nice connection established (SYN->SYN/ACK->ACK) and then the request for the page. Then publicfile responds that the page isn't there. It can't be a networking issue, since the connection is there. > > what about your dynamic IP<->symlink hack? could it be working by > the time you telnet into the machine, but not until some time has > passed? > Checked that. No, it seems fine, and right after my browser gets the 404 from publicfile, I can still telnet/ftp to the server and fetch the page. It's there alright. > > The problem surfaced after I changed my IP (for the N-th time). But > > the links are there, the files are there, and publicfile is > > obviously responding... > > you got disconnected? oh, my ... some ISPs just don't know about > quality content, right? I disconnect/reconnect due to mobility of the server (my laptop, that is). I use three different connections (home DSL, univ. wireless and univ. wired LAN), hence the constant change of IPs. Now, a friend suggested that this might have got something to do with the headers not being set properly (the message length of the reply?). The following should give you a good hint as to what's wrong: [apapadop@unix45 ~]$ telnet 128.2.66.150 55555 Trying 128.2.66.150... Connected to 128.2.66.150. Escape character is '^]'. GET <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Why linux?</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> ... (snip page content) </body> </html> Connection closed by foreign host. [apapadop@unix45 ~]$ telnet 128.2.66.150 55555 Trying 128.2.66.150... Connected to 128.2.66.150. Escape character is '^]'. GET / HTTP /1.0 Host: 128.2.66.150:55555 HTTP/1.1 404 file does not exist Server: publicfile Date: Tue, 19 Nov 2002 19:20:23 GMT Content-Length: 47 Connection: close Content-Type: text/html <html><body>file does not exist</body></html> Connection closed by foreign host. [apapadop@unix45 ~]$ What does that mean? With a "proper" (I guess) HTTP request, publicfile spits out a 404, with a bare "GET", it serves the page. - -A - -- http://andrew.cmu.edu/~apapadop/pub_key.asc 3DAD 8435 DB52 F17B 640F D78C 8260 0CC1 0B75 8265 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE92o9OgmAMwQt1gmURAjTRAJ4+2X9OycefwvKar3tAqLQIUdy06wCdFUkI gqVRrMd1eP+umRk/bHO0JWI= =u6w4 -----END PGP SIGNATURE-----