Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-directcontrolservlet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
8c10669a
authored
2014-09-11 18:55:35 -0500
by
Ean Schuessler
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Make detection of form-encoded forgiving #4034
1 parent
a9fc2c01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
8c10669
...
...
@@ -117,7 +117,6 @@ public class DirectControlServlet extends HttpServlet {
String
httpMethod
=
request
.
getMethod
();
if
(
method
==
null
&&
httpMethod
!=
null
)
method
=
httpMethod
;
if
(
method
==
null
)
method
=
"GET"
;
Debug
.
logInfo
(
"Method: HTTP("
+
httpMethod
+
") embedded("
+
method
+
")"
,
module
);
// Load context
Map
<
String
,
Object
>
context
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -130,7 +129,7 @@ public class DirectControlServlet extends HttpServlet {
}
}
else
{
// Check if the request is a backbone style "emulateJSON" request
if
(
request
.
getContentType
()
==
"application/x-www-form-urlencoded"
&&
if
(
request
.
getContentType
()
.
indexOf
(
"x-www-form-urlencoded"
)
!=
-
1
&&
request
.
getParameter
(
"model"
)
!=
null
)
{
JSON
json
=
new
JSON
(
new
StringReader
(
request
.
getParameter
(
"model"
)));
Map
<
String
,
Object
>
items
=
json
.
JSONObject
();
...
...
Please
register
or
sign in
to post a comment