Skip to content

Duplicated Content-* headers sent to target URL #42

Description

@A-Circle-Zhang

When there is a Content-Type header in the request,

My PHP environment will set both CONTENT_TYPE and HTTP_CONTENT_TYPE to the $_SERVER variable.

also Content-Length or any Content-* header.

if (strpos($key, 'HTTP_') === 0 || strpos($key, 'CONTENT_') === 0) {

This code causes duplicated Content-Type headers sent to target URL.

Most servers just ignore duplicated headers and automatically choose the last one,

but some strict server will response a 400 Bad Request when duplicated headers received.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions