git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee97067
)
Fix debugger for the case of a big payload with latin1 characters
author
gggeek
<giunta.gaetano@gmail.com>
Fri, 17 Apr 2015 23:03:23 +0000
(
00:03
+0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Fri, 17 Apr 2015 23:03:23 +0000
(
00:03
+0100)
debugger/common.php
patch
|
blob
|
history
diff --git
a/debugger/common.php
b/debugger/common.php
index
ecd09cf
..
ea389a6
100644
(file)
--- a/
debugger/common.php
+++ b/
debugger/common.php
@@
-28,8
+28,8
@@
$preferredEncodings = 'UTF-8, ASCII, ISO-8859-1, UTF-7, EUC-JP, SJIS, eucJP-win,
$inputcharset = mb_detect_encoding(urldecode($_SERVER['REQUEST_URI']), $preferredEncodings);
if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') {
$_GET = $_POST;
$inputcharset = mb_detect_encoding(urldecode($_SERVER['REQUEST_URI']), $preferredEncodings);
if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') {
$_GET = $_POST;
- /// @
todo detect encoding, eg from from http headers?
-
// mb_detect_encoding(urldecode($_SERVER['...'])
, $preferredEncodings);
+ /// @
bug this is not a perfect detection method - it will fail if eg. a latin1 character is in the method name
+
$inputcharset = mb_detect_encoding(urldecode(isset($_GET['methodpayload'])) ? $_GET['methodpayload'] : ''
, $preferredEncodings);
}
// recover input parameters
}
// recover input parameters