简体   繁体   中英

equivalent HTTP queries get different responses

GET http://d9.c4.b1.a0.top.list.ru/ HTTP/1.0\\r\\nHost: d9.c4.b1.a0.top.list.ru\\r\\n\\r\\n

response:

HTTP/1.0 400 Bad Request
Server: wz/1.5
Date: Sat, 17 Nov 2012 19:00:20 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Length: 0
Connection: close


GET / HTTP/1.0\\r\\nHost: d9.c4.b1.a0.top.list.ru\\r\\n\\r\\n

response:

HTTP/1.0 302 Moved Temporarily
Server: wz/1.5
Date: Sat, 17 Nov 2012 19:06:27 GMT
Location: http://top.mail.ru/
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Length: 0
Connection: close

What is difference between these queries?

PS Queries were made using telnet .

From the HTTP 1.0 specification on the Request-URI :

The absoluteURI form is only allowed when the request is being made to a proxy.

So it seems that the server you send this request to is not a proxy but probably the specified server itself.

Using the absolute URI in the request line in a request sent to the specified server is only valid in HTTP 1.1 :

To allow for transition to absoluteURIs in all requests in future versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM