Skip to content

Allow arbitrary headers to sent with Bazel Downloader #17829

@thesayyn

Description

@thesayyn

Description of the feature request:

Currently, bazel sets some headers when sending an HTTP request to fetch artifacts over the internet. While this works well for most cases, it doesn't work at all when the remote server requires some HTTP headers to be set to special values.

For instance, currently bazel sets all the Accept header to text/html, image/gif, image/jpeg, */* in outgoing HTTP requests. In my case, its Accept header that needs to be set to application/vnd.oci.image.manifest.v1+json so that docker registry sees no problem responding when the image has oci manifest types.

See: #16659 (comment)

Related to #16682

What underlying problem are you trying to solve with this feature?

No response

Which operating system are you running Bazel on?

darwin/arm64

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions