0

In particular, I have this response header from an nginx server:

HTTP/1.1 200 OK Server: nginx/1.10.3 (Ubuntu) Date: Tue, 20 Mar 2018 10:28:24 GMT Content-Type: text/html Last-Modified: Thu, 28 Jan 2016 10:50:21 GMT Connection: keep-alive ETag: W/"56a9f26d-2d97" Content-Encoding: gzip 

Followed by some 3352 Bytes of compressed data. I'm trying to find out how does the client know where the body of this message ends and a new response begins.

1
  • I think gzip contains the size in the header Commented Mar 20, 2018 at 13:16

1 Answer 1

1

It doesn't. The response requires either a Content-Length response header field, or it has to use "Transfer-Encoding: chunked".

Sign up to request clarification or add additional context in comments.

1 Comment

You're right. I generated the above HTTP header with curl -I <URL> (which sends the HEAD request) instead of curl -sD - <URL> -o /dev/null and so the response was missing the Transfer-Encoding: chunked header field.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.