plain text in Accept-Encoding HTTP Header
Asked Answered
F

1

8

I'm writing a HTTP client which doesn't have any encoding algorithms built into it yet. Therefore, I was wondering if there is a value for Accept-Encoding header to indicate this? like: "none" for example, or "text/plain" or similar ?

Featurelength answered 9/9, 2013 at 6:59 Comment(1)
Note that the correct syntax is: Accept-Encoding: identity (and not "none"). However, many servers don't understand the identity properly...Cinemascope
N
4

You can just omit the Accept-Encoding header if you don't support compression:

http://www.httpwatch.com/httpgallery/compression/

However, this will not prevent some servers sending you chunked encoded responses:

http://www.httpwatch.com/httpgallery/chunked/

on persistent "keep-alive" HTTP connections. You can disable persistent connections by adding a "Connection: close" request header and the server will simply close the connection after all the content has been returned in the response message.

Neral answered 9/9, 2013 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.