Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ba-simple-proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] ) {
Expand All @@ -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'] ) );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP_CONTENT_TYPE must be CONTENT_TYPE. See section 4.1.3 from The Common Gateway Interface (CGI) Version 1.1.


list( $header, $contents ) = preg_split( '/([\r\n][\r\n])\\1/', curl_exec( $ch ), 2 );

$status = curl_getinfo( $ch );
Expand Down