mimeheader icon indicating copy to clipboard operation
mimeheader copied to clipboard

Accept-Encoding support

Open Jille opened this issue 1 year ago • 3 comments

Hi. Thanks for the library :)

Any plans for adding Accept-Encoding support? It currently doesn't work, I suspect because "gzip, br" doesn't contain slashes like mime-types.

Jille avatar Jan 18 '24 15:01 Jille

@Jille Thank you for the ticket. Could you please describe the whole use case for that and I'll be happy to add it.

aohorodnyk avatar Mar 22 '24 19:03 aohorodnyk

I want to know which encodings are supported by the client. A browser might send Accept-Encoding: gzip, br, older browsers would not include br and a more minimal implementation might not send any header at all.

Based on this I'd let the server pick the best available compression.

Jille avatar Mar 22 '24 23:03 Jille

@Jille It looks similar, but it will require either adding new parser and type or significant refactoring with breaking API.

Do you have any suggestions how would you like to see the feature in the repo? Maybe you know some other similar headers that can be covered by a lib?

aohorodnyk avatar May 31 '24 01:05 aohorodnyk