File tree Expand file tree Collapse file tree
pfSense-pkg-API/files/etc/inc/api/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ function get_request_data() {
3535 # TODO: x-www-form-urlencoded still attempts to use json if no parameters were passed in. This was intentionally done to
3636 # TODO: support user scripts that didn't specify a static content type (before it was supported) remove this in a future
3737 # TODO: release. It is preferred that content uses a specified content type.
38+ $ _SERVER ["HTTP_CONTENT_TYPE " ] = (empty ($ _SERVER ["HTTP_CONTENT_TYPE " ])) ? "application/x-www-form-urlencoded " : $ _SERVER ["HTTP_CONTENT_TYPE " ];
3839 $ content_types = [
3940 "application/json " => json_decode (file_get_contents ('php://input ' ), true ),
4041 "application/x-www-form-urlencoded " => (empty ($ _GET )) ? json_decode (file_get_contents ('php://input ' ), true ) : $ _GET
You can’t perform that action at this time.
0 commit comments