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
33225dc9
authored
2016-10-13 15:09:55 -0500
by
Ean Schuessler
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'BF-7877' of /home/git/repositories/brainfood/ofbiz-directcontrolservlet
2 parents
1696b6ea
6bf4b8e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
33225dc
...
...
@@ -320,7 +320,7 @@ public class DirectControlServlet extends HttpServlet {
if
(
"application/json"
.
equals
(
contentType
))
{
// Read request body as JSON and insert into the context
Map
<
String
,
Object
>
items
=
UtilGenerics
.
cast
(
JSON
.
from
(
UtilIO
.
readString
(
new
FileReader
(
tmpFile
))).
toObject
(
Map
.
class
));
Map
<
String
,
Object
>
items
=
UtilGenerics
.
cast
(
JSON
.
from
(
UtilIO
.
readString
(
new
InputStreamReader
(
new
FileInputStream
(
tmpFile
),
"UTF-8"
))).
toObject
(
Map
.
class
));
for
(
Object
key
:
items
.
keySet
())
{
context
.
put
((
String
)
key
,
items
.
get
(
key
));
}
...
...
@@ -464,12 +464,12 @@ public class DirectControlServlet extends HttpServlet {
setResponseNoCache
();
if
(
"JSON"
.
equals
(
outputHandler
))
{
response
.
setContentType
(
"application/x-json"
);
response
.
setContentType
(
"application/x-json
;charset=UTF-8
"
);
PrintWriter
writer
=
response
.
getWriter
();
String
jsonStr
=
JSON
.
from
(
result
).
toString
();
response
.
setContentLength
(
jsonStr
.
getBytes
(
"UTF8"
).
length
);
response
.
setContentLength
(
jsonStr
.
getBytes
(
"UTF
-
8"
).
length
);
writer
.
write
(
jsonStr
);
writer
.
flush
();
writer
.
close
();
...
...
Please
register
or
sign in
to post a comment