Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

Response HTTP Header

$
0
0

Hi,

Am I right to say that all GET request will produce a response with http header?
Why  I am asking that? Because with some tests I get a response with no header.

See below:
##################
### SENDING
##################
GET http://server.name/ws/teste.txt\r\n
\r\n
##################
### RECEIVING
##################
TESTE

In the request above I dont sent the HTTP version neither the HOST, it works, the file content was send back, but look, there is no header.

In the request below I sent the HTTP version and the HOST, it works too, and now I get the header.

##################
### SENDING
##################
GET http://server.name/ws/teste.txt HTTP/1.1\r\n
Host: server.name\r\n
\r\n
##################
### RECEIVING
##################
HTTP/1.1 200 OK\r\n
Content-Type: text/plain\r\n
Last-Modified: Thu, 20 Jan 2011 20:01:09 GMT\r\n
Accept-Ranges: bytes\r\n
ETag: "ab78a3c7dcb8cb1:0"\r\n
Server: Microsoft-IIS/7.0\r\n
X-Powered-By: ASP.NET\r\n
Date: Fri, 21 Jan 2011 16:04:28 GMT\r\n
Content-Length: 5\r\n
\r\n
TESTE

Is it a normal behavior?

Regards,
Leo


Viewing all articles
Browse latest Browse all 28058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>