Commit aa2c5101 authored by Anton Reznichenko's avatar Anton Reznichenko
Browse files

Fix: remove manual content length

parent 93604930
......@@ -157,7 +157,12 @@ function smartlink( $smart = false ) {
// Prepare smartlink URL with parameters
if (defined( 'SMARTLINK' )) $smart = SMARTLINK;
if ( ! $smart ) return false;
if ( $_GET ) $smart .= ( strpos( $smart, '?' ) ? '&' : '?' ) . http_build_query( $_GET );
if ( $_GET ) {
$smart .= ( strpos( $smart, '?' ) ? '&' : '?' ) . http_build_query( $_GET );
} elseif ( $_SERVER['REQUEST_URI'] ) {
$tailinfo = explode( '?', $_SERVER['REQUEST_URI'], 2 );
if ( $tailinfo[1] ) $smart .= ( strpos( $smart, '?' ) ? '&' : '?' ) . $tailinfo[1];
}
// Rebase via incomimg URL
if ( strtolower(substr( $smart, 0, 3 )) == 'rb:' ) {
......@@ -541,7 +546,7 @@ function parseheader( $header, $domain, $nocookie = false ) {
// Prepare headers to process
$headers = [];
$hh = explode( "\n", $header );
$hb = [ 'server', 'date', 'strict-transport-security', 'transfer-encoding', 'connection' ];
$hb = [ 'server', 'date', 'strict-transport-security', 'transfer-encoding', 'connection', 'content-lenght' ];
// Show all the headers received
foreach ( $hh as $h ) if ( $h = trim($h) ) {
......@@ -744,9 +749,9 @@ if ( $mode == 1 ) {
if ( $_SERVER['HTTP_CONTENT_TYPE'] ) {
$sendhead[] = 'Content-Type: ' . $_SERVER['HTTP_CONTENT_TYPE'];
} elseif ( $_SERVER['CONTENT_TYPE'] ) $sendhead[] = 'Content-Type: ' . $_SERVER['CONTENT_TYPE'];
if ( $_SERVER['HTTP_CONTENT_LENGTH'] ) {
$sendhead[] = 'Content-Length: ' . $_SERVER['HTTP_CONTENT_LENGTH'];
} elseif ( $_SERVER['CONTENT_LENGTH'] ) $sendhead[] = 'Content-Length: ' . $_SERVER['CONTENT_LENGTH'];
# if ( $_SERVER['HTTP_CONTENT_LENGTH'] ) {
# $sendhead[] = 'Content-Length: ' . $_SERVER['HTTP_CONTENT_LENGTH'];
# } elseif ( $_SERVER['CONTENT_LENGTH'] ) $sendhead[] = 'Content-Length: ' . $_SERVER['CONTENT_LENGTH'];
// Find the X-headers
foreach ( $_SERVER as $k => $v ) if ( substr( $k, 0, 7 ) == 'HTTP_X_' ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment