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
5212166b
authored
2016-08-25 15:56:47 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Catch ServiceAuthException, and return HTTP 401 Unauthorized.
Refs: #7593
1 parent
4d463c3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
5212166
...
...
@@ -75,6 +75,7 @@ import org.ofbiz.entity.condition.EntityCondition;
import
org.ofbiz.service.DispatchContext
;
import
org.ofbiz.service.LocalDispatcher
;
import
org.ofbiz.service.ModelService
;
import
org.ofbiz.service.ServiceAuthException
;
import
org.ofbiz.service.ServiceContainer
;
import
org.apache.commons.csv.CSVFormat
;
...
...
@@ -247,6 +248,11 @@ public class DirectControlServlet extends HttpServlet {
processRequest
();
}
catch
(
IOException
e
)
{
throw
e
;
}
catch
(
ServiceAuthException
e
)
{
e
.
printStackTrace
();
Debug
.
logError
(
e
,
"ServiceAuthException"
,
module
);
response
.
setStatus
(
401
);
setResponseNoCache
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
(
IOException
)
new
IOException
(
e
.
getMessage
()).
initCause
(
e
);
...
...
Please
register
or
sign in
to post a comment