-
Aug 24th, 2010, 02:42 PM
#1
@ResponseStatus "reason" problem?
hi everybody
while trying to create a RESTful ws with @MVC, i have noticed some odd behavior of @ResponseStatus reason property in exception handling:
@ExceptionHandler(AuthenticationException.class)
@ResponseStatus(value=HttpStatus.FORBIDDEN, reason="user authentication failed")
public void handleUsernameNotFoundException(UsernameNotFoundEx ception unfEx) { }
the actual response i get is code 403 as expected, but "Forbidden" as status reason, which should not be - it should be "user authentication failed" as described in reason. anyone has an idea why don't i get the expected string?
thanks
Yuval
-
Jan 4th, 2012, 02:07 PM
#2
I'm going through the same problem, please share the solution if solved it
I am having some problem, how did you solve it?
-
Jan 5th, 2012, 03:16 PM
#3
Running a quick test of the above example I fail to reproduce the issue. If you can isolate it in a minimal project that would help.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules