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

CONTENT_TYPE retained in H2O.next but not in H2O.reprocess? #2255

Closed
utrenkner opened this issue Feb 6, 2020 · 1 comment
Closed

CONTENT_TYPE retained in H2O.next but not in H2O.reprocess? #2255

utrenkner opened this issue Feb 6, 2020 · 1 comment

Comments

@utrenkner
Copy link
Contributor

I just noticed a subtle but important difference in how H2O.next and H2O.reprocess handle env, and I wonder whether or not this is intended:

The next handler called via H2O.next receives the env with CONTENT_TYPE. The call issued by H2O.reprocess does not contain the original CONTENT_TYPE (or any CONTENT_TYPE for that matter).

In a WordPress backend and using H2O.reprocess I receive only status codes of 400 for calls to /wp-admin/admin-ajax.php. This is because "CONTENT_TYPE"=>"application/x-www-form-urlencoded; charset=UTF-8" is dropped from the request (env). And I do not know of any way to re-enter it.

Using H2O.next, the original CONTENT_TYPE of the request is retained and I get the proper 200 answer.

For some more background: I was playing around with @i110 's patch that solved my problems with H2O.next and H2O.reprocess.

@i110
Copy link
Contributor

i110 commented Feb 7, 2020

Thank you for reporting: this helped me a lot. Fixed in #2256

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

2 participants