Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated Content-* headers sent to target URL #42

Open
A-Circle-Zhang opened this issue Feb 27, 2021 · 0 comments
Open

Duplicated Content-* headers sent to target URL #42

A-Circle-Zhang opened this issue Feb 27, 2021 · 0 comments

Comments

@A-Circle-Zhang
Copy link

A-Circle-Zhang commented Feb 27, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant