Re: POST on redirects?

From: Date: Mon, 07 Aug 2006 15:03:10 +0000
Subject: Re: POST on redirects?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-240260@lists.php.net to get a copy of this message
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.

« previous php.general (#240260) next »