Index: branches/wmf/1.18wmf1/extensions/Collection/Collection.body.php |
— | — | @@ -1268,7 +1268,14 @@ |
1269 | 1269 | curl_setopt( $c, CURLOPT_POST, true ); |
1270 | 1270 | curl_setopt( $c, CURLOPT_POSTFIELDS, $postFields ); |
1271 | 1271 | } |
1272 | | - curl_setopt( $c, CURLOPT_HTTPHEADER, array( 'Expect:' ) ); |
| 1272 | + |
| 1273 | + # Send the client IP to the server |
| 1274 | + $headers = array( |
| 1275 | + 'Expect:', |
| 1276 | + 'X-Forwarded-For: ' . wfGetIP() |
| 1277 | + ); |
| 1278 | + curl_setopt( $c, CURLOPT_HTTPHEADER, $headers ); |
| 1279 | + |
1273 | 1280 | curl_setopt( $c, CURLOPT_HEADER, false ); |
1274 | 1281 | if ( is_object( $wgTitle ) ) { |
1275 | 1282 | curl_setopt( $c, CURLOPT_REFERER, wfExpandUrl( $wgTitle->getFullURL(), PROTO_CURRENT ) ); |