Revision: 1244
Author: christian.wuerker
Date: Tue Jul 21 20:36:58 2015 UTC
Log: Disable update of HTTP request body for parameter changes.
https://code.google.com/p/cmclasses/source/detail?r=1244
Modified:
/trunk/src/Net/HTTP/Request.php
=======================================
--- /trunk/src/Net/HTTP/Request.php Sat May 23 06:45:51 2015 UTC
+++ /trunk/src/Net/HTTP/Request.php Tue Jul 21 20:36:58 2015 UTC
@@ -123,7 +123,7 @@
}*/
$this->setMethod( strtoupper( getEnv( 'REQUEST_METHOD' ) ) ); //
store HTTP method
- $this->body = file_get_contents( "php://input" ); // store
raw post or file data
+ $this->body = file_get_contents( "php://input" ); // store
raw POST, FILE or PUT data
}
public function fromString( $request )
@@ -251,13 +251,15 @@
{
# remark( 'R:remove: '.$key );
parent::remove( $key );
- $this->body = http_build_query( $this->getAll(), NULL, '&' );
+// if( $this->method === "POST" )
+// $this->body = http_build_query( $this->getAll(), NULL, '&' );
}
public function set( $key, $value )
{
parent::set( $key, $value );
- $this->body = http_build_query( $this->getAll(), NULL, '&' );
+// if( $this->method === "POST" )
+// $this->body = http_build_query( $this->getAll(), NULL, '&' );
}
public function setAjax( $value = 'X-Requested-With' )