Skip to content

Consolidate content type and content encoding functions in prometheus/common #652

@mrueg

Description

@mrueg

I recently added zstd support to client_golang in prometheus/client_golang#1496 which uses an internalized version of the archived repository: https://github.com/golang/gddo/blob/master/httputil/negotiate.go

I see that

for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) {
was recently changed to use https://github.com/munnerz/goautoneg for contentType logic in #625

Would you be open to include the logic for content encoding implemented in client_go in here and replace goautoneg with ggdo/httputil (we could either consume from the archived repository or internalize it into this repository; we took the second approach for client_golang)?

This likely would help with consolidating the library for content encoding as well as content type and allow reusing parts of it in prometheus/prometheus as well (e.g. in prometheus/prometheus#13866)

CC: @bwplotka

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions