Skip to content

Decide what a package does when the runtime drops a header it was configured to send #189

Open

Description

@jwrosewell

HttpClientDefault can only send the Origin header when sun.net.http.allowRestrictedHeaders is set before the JDK's HTTP connection class first loads. A package cannot rely on that, because the application may have loaded the class already, so a header the caller configured can be dropped without the caller being told.

#142 does not change it, and this issue holds the decision. Under James Rosewell's rule of 12 November, "Let's make it really hard for people to configure us badly", a setting that would make the package wrong where it runs is refused with a message saying what to do instead, rather than warned about. So the choice is between refusing the configuration at build time, naming the system property to set, and warning once when a configured header is dropped.

Whatever is chosen applies to every language that sets request headers through a runtime that can drop them, so the answer belongs in the specification as well as in this repository.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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