When I telnet my server it is getting connected, however after telnet connection if I request for GET /, it is not giving any response. But, after telnet connection if I request for GET / HTTP/1.1, it is giving me response. May I know this is a firewall issue as Im not getting response for GET / but getting for GET / HTTP/1.1
-
`GET /` is not a properly formed http request. – user9517 Sep 27 '16 at 19:46
-
@lain not sure why GET / is working for the other 3 – balaji Sep 27 '16 at 21:20
-
someone down voted it :(, not sure why as it is an issue that im facing currently – balaji Sep 28 '16 at 05:54
-
OK, so here's the problem, your question is pretty crappy. You've chucked some stuff at the internet and screamed HALP! in the hope that someone will take pity on you and hold your hand through a series of reverse Q&A to help you troubleshoot your problem. You have not provided anywhere near sufficient information for anyone to answer your question. You need tech support and that is not what SF provides. – user9517 Sep 28 '16 at 06:13
-
@lain ok got it – balaji Sep 28 '16 at 07:34
2 Answers
The original HTTP 0.9 protocol allowed the use of a single GET without specifying either protocol of hostname. For example:
GET /index.html
To use HTTP 1.0, you need to specify the protocol, however the Host header field had yet to be defined by RFC so is not required. Example HTTP 1.0 request:
GET /index.html HTTP/1.0
For HTTP 1.1, you need to specify the protocol AND Host header as per RFC 2616:
GET /index.html HTTP/1.1
Host: www.example.com
It is possible that your webservers have support for different versions of the HTTP protocol and therefore some accept the HTTP 0.9 style request whilst other, newer servers, don't.

- 1,143
- 1
- 7
- 11
-
Hi Mark, is "GET /index.html" same as "GET /", thanks for your answer :) – balaji Sep 28 '16 at 08:37
-
It depends. `GET /` will return whichever file has been set as root on the server, however this doesn't necessarily have to be `index.html`, but it is quite common. – Mark Riddell Sep 28 '16 at 11:41
-
Also, I have done curl --head for all the severs , somehow I got 1.1 as HTTP protocol version. – balaji Sep 28 '16 at 12:10
-
Curl (and most other CLI or GUI based web clients) uses HTTP 1.1 unless you tell it otherwise. The `-0` flag can be used to send the request using HTTP 1.0 ([source](https://curl.haxx.se/docs/manpage.html)) – Mark Riddell Sep 28 '16 at 12:35
While simple web servers may respond to "GET /", it is not a proper/true/compliant request, so either a firewall or even the web server is not parsing and processing the request.
-
Hi Slass, thanks for your answer :), we have 3 more webservers for which this "GET /" is working not sure not for a particular webserver it is not working – balaji Sep 27 '16 at 20:33
-
Just use "GET / HTTP/1.1" for all the servers, it _should_ work for all of them. – slass100 Sep 27 '16 at 20:38
-
-
I assume you are trying with "GET
/ – slass100 Sep 27 '16 at 21:22HTTP/1.1". Looks like a is missing in the comment above. Maybe test with "wget" or "curl" and look at how these command-line apps format the request.