Index: trunk/phpwiki/newcodebase/OutputPage.php |
— | — | @@ -324,11 +324,19 @@ |
325 | 325 | $elapsed = $now - $start; |
326 | 326 | |
327 | 327 | if ( "" != $wgDebugLogFile ) { |
| 328 | + if( $forward = $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'] ) |
| 329 | + $forward = " forwarded for $forward"; |
| 330 | + if( $client = $HTTP_SERVER_VARS['HTTP_CLIENT_IP'] ) |
| 331 | + $forward .= " client IP $client"; |
| 332 | + if( $from = $HTTP_SERVER_VARS['HTTP_FROM'] ) |
| 333 | + $forward .= " from $from"; |
| 334 | + if( $forward ) |
| 335 | + $forward = "\t(proxied via {$HTTP_SERVER_VARS['REMOTE_ADDR']}{$forward})"; |
328 | 336 | $log = sprintf( "%s\t%04.3f\t%s\n", |
329 | 337 | date( "YmdHis" ), $elapsed, |
330 | | - urldecode( $HTTP_SERVER_VARS['REQUEST_URI'] ) ); |
| 338 | + urldecode( $HTTP_SERVER_VARS['REQUEST_URI'] . $forward ) ); |
331 | 339 | error_log( $log, 3, $wgDebugLogFile ); |
332 | | - } |
| 340 | + } |
333 | 341 | $com = sprintf( "<!-- Time since request: %01.2f secs. -->", |
334 | 342 | $elapsed ); |
335 | 343 | return $com; |