Open ro-ka opened 8 years ago
Hey, thanks for pointing out the issue and also for your PR. Part of this plugin goal is to bring back the same behavior qs feature used to have on Hapi<=11, I've tested it and did see that current behavior is the one expected on hapi@11, so I don't think that changing the default behavior is good in this case.
Having said that, I do see what you pointed out as an issue since it limits integration with other plugins. Going a bit deeper in the issue I think that the root problem is that we need to be able to disable the plugin in a route basis.
Hi! Yes, I think there might be more possible incompabilities with other plugins. For my problem I managed to get rid of the Content-Type header.
The payload is set to an object but it should be empty. That causes an error in
hapijs/h2o2
. To reproduce, here is the minimal setup.package.json
The index.js:
I installed
good
for logging. What causes this error is this header:Content-Type: application/x-www-form-urlencoded
. So when usingcurl
, this is what happens:The error only occurs when the header set. The payload is an empty object which breaks the proxy plugin. Can the payload be set to
null
or an empty string when there is nothing parsed?