You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1997/01/26 18:43:19 UTC

HTTP/1.1 requests failing

Should this not work? Perhaps telnet can't handle a 1.1 response?


#> telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Sun, 26 Jan 1997 17:40:43 GMT
Server: Apache/1.2b6-dev
Connection: close
Content-type: text/html

<HEAD><TITLE>400 Bad Request</TITLE></HEAD>
<BODY><H1>Bad Request</H1>
Your browser sent a request that
this server could not understand.<P>
</BODY>

#> telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Sun, 26 Jan 1997 17:41:48 GMT
Server: Apache/1.2b6-dev
Connection: close
Content-Type: text/html

<HEAD><TITLE>Index of /</TITLE></HEAD><BODY>
<H1>Index of /</H1>
<UL><LI> <A HREF="/"> Parent Directory</A>       
<LI> <A HREF="env.cgi"> env.cgi</A>                
<LI> <A HREF="testme.html"> testme.html</A>            
</UL></BODY>Connection closed by foreign host.



Re: HTTP/1.1 requests failing

Posted by Marc Slemko <ma...@znep.com>.
On Sun, 26 Jan 1997, Randy Terbush wrote:

> 
> Should this not work? Perhaps telnet can't handle a 1.1 response?

Telnet can handle most anything.  What it can't is because the other end
tries to be smart and detect telnet and stop it from using.  Then use nc.
nc is cool.  TCP, UDP client and server and portscanner.

> 
> 
> #> telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET / HTTP/1.1

That is a bad request.  Remember that you need a Host: header.  Try
something like:

marcs@valis:~$ telnet alive 80
Trying 207.167.5.33...
Connected to alive.worldgate.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: alive

HTTP/1.1 200 OK
Date: Sun, 26 Jan 1997 17:40:38 GMT
Server: Apache/1.2b5-dev
Connection: close
Content-Type: text/html
Last-Modified: Mon, 30 Dec 1996 04:16:15 GMT
ETag: "2d14a-1fd-32c7420f"
Content-Length: 509
Accept-Ranges: bytes

....

> 
> HTTP/1.1 400 Bad Request
> Date: Sun, 26 Jan 1997 17:40:43 GMT
> Server: Apache/1.2b6-dev
> Connection: close
> Content-type: text/html
> 
> <HEAD><TITLE>400 Bad Request</TITLE></HEAD>
> <BODY><H1>Bad Request</H1>
> Your browser sent a request that
> this server could not understand.<P>
> </BODY>
> 
> #> telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET / HTTP/1.0
> 
> HTTP/1.1 200 OK
> Date: Sun, 26 Jan 1997 17:41:48 GMT
> Server: Apache/1.2b6-dev
> Connection: close
> Content-Type: text/html
> 
> <HEAD><TITLE>Index of /</TITLE></HEAD><BODY>
> <H1>Index of /</H1>
> <UL><LI> <A HREF="/"> Parent Directory</A>       
> <LI> <A HREF="env.cgi"> env.cgi</A>                
> <LI> <A HREF="testme.html"> testme.html</A>            
> </UL></BODY>Connection closed by foreign host.
> 
>