softius / php-cross-domain-proxy

PHP Proxy for Cross Domain Requests
GNU General Public License v3.0
269 stars 141 forks source link

Allows the forwarding of Content-* headers necessary to POST/JSON #11

Closed aaparmeggiani closed 8 years ago

aaparmeggiani commented 9 years ago

krinklemail at gmail dot com - 2 years ago [0] If requests to your PHP script send a header "Content-Type" or/ "Content-Length" it will, contrary to regular HTTP headers, not appear in $_SERVER as $_SERVER['HTTP_CONTENTTYPE']. PHP removes these (per CGI/1.1 specification[1]) from the HTTP match group.

They are still accessible, but only if the request was a POST request. When it is, it'll be available as: $_SERVER['CONTENT_LENGTH'] $_SERVER['CONTENT_TYPE']

[0] http://php.net/manual/en/reserved.variables.server.php [1] https://www.ietf.org/rfc/rfc3875

softius commented 8 years ago

Thats great thanks.