1

I can send telnet command to google.com but not to tinyurl.com

On windows telnet I typed the following:

set localecho
set crlf
o tinyurl.com 80

It returns 400-bad request, why?


I know I should use HTTP 1.1 the problem is I cannot even connect to the server it closes it after sending 404 error. Why?

1 Answer 1

2

I can get it to work here (Linux) by using HTTP 1.1 commands.

Try something along the lines of:

GET /foobar HTTP/1.1
Host: tinyurl.com

Followed, of course, by two newlines. One of the headers returned by tinyurl is

Server: TinyURL/1.6

Which suggests that they do use a custom webserver that does not accommodate HTTP 0.9/1.0 requests.

2
  • Michiel wrote "one of the headers", which is correct: web-sniffer.net/… It does support HTTP 1.0 though (when used with Host header) and should not respond with 400 Bad Request when just opening the connection. Rebol needs to provide more details about the desired request.
    – Arjan
    Aug 18, 2009 at 11:09
  • Ah, you wrote the last statement, so: you were referring to the which suggests part. (I somehow thought you were saying that the quoted header itself was false information.) You're totally right, the first header indeed indicates the server is supposed to support 1.1 and earlier.
    – Arjan
    Aug 20, 2009 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .