dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7361de
)
api.php: Use $wgRequest to retrieve User-agent string
author
Sergio Santoro
<santoro.srg@gmail.com>
Sun, 20 Jul 2014 13:47:21 +0000
(15:47 +0200)
committer
Sergio Santoro
<santoro.srg@gmail.com>
Sun, 20 Jul 2014 13:47:21 +0000
(15:47 +0200)
api.php was directly accessing $_SERVER superglobal.
It should use WebRequest wrapper object instead.
Change-Id: I244fb7a35476e9a35a5dc97f898d39c82c54b7fa
api.php
patch
|
blob
|
history
diff --git
a/api.php
b/api.php
index
e8a911e
..
80abc35
100644
(file)
--- a/
api.php
+++ b/
api.php
@@
-104,7
+104,7
@@
if ( $wgAPIRequestLog ) {
wfTimestamp( TS_MW ),
$endtime - $starttime,
$wgRequest->getIP(),
- $
_SERVER['HTTP_USER_AGENT']
+ $
wgRequest->getHeader( 'User-agent' )
);
$items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';
if ( $processor ) {