diff --git a/ba-simple-proxy.php b/ba-simple-proxy.php index b1fa6e8..a6ee35d 100644 --- a/ba-simple-proxy.php +++ b/ba-simple-proxy.php @@ -161,7 +161,7 @@ if ( strtolower($_SERVER['REQUEST_METHOD']) == 'post' ) { curl_setopt( $ch, CURLOPT_POST, true ); - curl_setopt( $ch, CURLOPT_POSTFIELDS, $_POST ); + curl_setopt( $ch, CURLOPT_POSTFIELDS, $HTTP_RAW_POST_DATA ); } if ( $_GET['send_cookies'] ) { @@ -183,6 +183,8 @@ curl_setopt( $ch, CURLOPT_USERAGENT, $_GET['user_agent'] ? $_GET['user_agent'] : $_SERVER['HTTP_USER_AGENT'] ); + curl_setopt( $ch, CURLOPT_HTTPHEADER, array( "Content-Type: " . $_SERVER['HTTP_CONTENT_TYPE'] ) ); + list( $header, $contents ) = preg_split( '/([\r\n][\r\n])\\1/', curl_exec( $ch ), 2 ); $status = curl_getinfo( $ch );