Re: POST on redirects?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Shiflett wrote:
Adam Zey wrote:
$headers .= "Content-Type: application/octet-stream\r\n";

I missed the context of this function, but it seems like you probably
mean to send:

Content-Type: application/x-www-form-urlencoded

Chris


The context is a bit strange, these POST transactions are being used to send data packets, since it's really the only way to send data to a server-side PHP script. The scripts involved are used to tunnel arbitrary TCP/IP data over a standard HTTP connection. The keepalive means that many POST transactions can be done in one connection, saving the latency and overhead involved in establishing new TCP/IP connections. And the content type of an octet stream is used because x-www-form-urlencoded would have to be decoded by the script on the server side. With an octet stream, the server-side script can just read the data in from php://input.

Thanks for the hint on the Connection header. It'll save me from more overhead :)

Regards, Adam Zey.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux