Index: trunk/phase3/includes/Setup.php |
— | — | @@ -183,25 +183,25 @@ |
184 | 184 | } else { |
185 | 185 | wfDebug( "Start request\n\n" ); |
186 | 186 | wfDebug( $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . "\n" ); |
187 | | - $header_out = "HTTP HEADERS:\n"; |
188 | 187 | |
189 | | - if ( function_exists( 'getallheaders' ) ) { |
190 | | - $headers = getallheaders(); |
191 | | - foreach ( $headers as $name => $value ) { |
192 | | - $header_out .= "$name: $value\n"; |
| 188 | + if ( $wgDebugPrintHttpHeaders ) { |
| 189 | + $headerOut = "HTTP HEADERS:\n"; |
| 190 | + |
| 191 | + if ( function_exists( 'getallheaders' ) ) { |
| 192 | + $headers = getallheaders(); |
| 193 | + foreach ( $headers as $name => $value ) { |
| 194 | + $headerOut .= "$name: $value\n"; |
| 195 | + } |
| 196 | + } else { |
| 197 | + $headers = $_SERVER; |
| 198 | + foreach ( $headers as $name => $value ) { |
| 199 | + if ( substr( $name, 0, 5 ) !== 'HTTP_' ) continue; |
| 200 | + $name = substr( $name, 5 ); |
| 201 | + $headerOut .= "$name: $value\n"; |
| 202 | + } |
193 | 203 | } |
194 | | - } else { |
195 | | - $headers = $_SERVER; |
196 | | - foreach ( $headers as $name => $value ) { |
197 | | - if ( substr( $name, 0, 5 ) !== 'HTTP_' ) continue; |
198 | | - $name = substr( $name, 5 ); |
199 | | - $header_out .= "$name: $value\n"; |
200 | | - } |
| 204 | + wfDebug( "$headerOut\n" ); |
201 | 205 | } |
202 | | - |
203 | | - if ( $wgDebugPrintHttpHeaders ) { |
204 | | - wfDebug( "$header_out\n" ); |
205 | | - } |
206 | 206 | } |
207 | 207 | |
208 | 208 | if( $wgRCFilterByAge ) { |