envoyproxy/envoy

compression: GET and HEAD headers do not match

Open

#14.225 geöffnet am 1. Dez. 2020

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/compressionhelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

Title: Content-Encoding header is not added to HEAD responses.

Description: Following header is not present in HEAD responses: content-encoding: gzip

RFC7231 specifies the following:

The server SHOULD send the same header fields in response to a HEAD request as it would have sent if the request had been a GET, except that the payload header fields (Section 3.3) MAY be omitted.

(NB! Content-Encoding is not in the list of payload-specific headers.)

Therefore this may cause issues with clients that follow RFC and expect HEAD and GET headers to match.

cc: @rojkov @antoniovicente

Contributor Guide