File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,6 @@ public static function decode($recv_buffer, TcpConnection $connection)
175
175
case 'application/x-www-form-urlencoded ' :
176
176
parse_str ($ http_body , $ _POST );
177
177
break ;
178
- case 'application/json ' :
179
- $ _POST = json_decode ($ http_body , true );
180
- break ;
181
178
}
182
179
}
183
180
}
@@ -205,8 +202,13 @@ public static function decode($recv_buffer, TcpConnection $connection)
205
202
$ _SERVER ['QUERY_STRING ' ] = '' ;
206
203
}
207
204
208
- // REQUEST
209
- $ _REQUEST = array_merge ($ _GET , $ _POST , $ _REQUEST );
205
+ if (is_array ($ _POST )) {
206
+ // REQUEST
207
+ $ _REQUEST = array_merge ($ _GET , $ _POST , $ _REQUEST );
208
+ } else {
209
+ // REQUEST
210
+ $ _REQUEST = array_merge ($ _GET , $ _REQUEST );
211
+ }
210
212
211
213
// REMOTE_ADDR REMOTE_PORT
212
214
$ _SERVER ['REMOTE_ADDR ' ] = $ connection ->getRemoteIp ();
You can’t perform that action at this time.
0 commit comments