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

Already on GitHub? Sign in to your account

No cookies, POST data etc. when proxying to port via ~/.pow/domain file #319

michiels opened this Issue Sep 9, 2012 · 8 comments


None yet
4 participants

michiels commented Sep 9, 2012

I am having a problem forwarding requests on a pow domain to a local PHP built-in server. PHP supports this since PHP 5.4.

It appears that not all headers are correctly forwarded to the PHP instance by pow since PHP thinks it doesn't get any cookies or POST data from those requests.

When curl'ing to the port (8080) directly. Everything works just fine.

I have looked at the Pow code that proxies the request but I can't find anything wrong with it since it just duplicates the original's request headers and sets the forwarded-for headers.

Any ideas about this one?

sheerun commented Feb 11, 2013

I have the same problem. What's the status?

I digged into this and found its a php builtin server bug, see the report https://bugs.php.net/bug.php?id=65633
node http module always lowercase headers so there is nothing pow can do to about this (other than proxing on a level below http, e.g. tcp proxy, but it couldn't add headers)

jhirbour commented Sep 9, 2013

If you're going to use PHP on OSX your better off installing it via homebrew. The bug mentioned is one of the many oddities of the built in PHP on OSX. The PHP packages that come with homebrew are much normal and closer to the ones that will be installed on a typical hosting environment.

the php builtin server is the php cli server invoked with php -S, it doesn't mean the php bins shipped with osx.
the bug is specific of the cli server sapi and involves all the version with it, even if installed with brew. have a look of the bug report, I did it against yesterday php git snapshot built directly from source

anyway the bug just got fixed php/php-src@3c3b2b5

Good to know. So this can probably be closed?

yeah I tried it the php builtin server installed with brew install php55 --HEAD --env=std behind pow and this problem is solved. besides it wasn't even a pow problem so it definitely can be closed.

Ok. I'll just close this issue since I was the original reporter. Invite anyone that still has the issue with brew's standard PHP to re-open it.

@michiels michiels closed this Sep 10, 2013

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