We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifu Zhou opened SPR-14315 and commented
If a controller method's specification were:
public ResponseEntity<StreamingResponseBody> foo(){ // code... }
and returns:
return new ResponseEntity<StreamingResponseBody>(someHeaders, HttpStatus.OK);
Then, the headers would be lost because they weren't flushed after not null check:
// StreamingResponseBodyReturnValueHandler#handleReturnValue if (ResponseEntity.class.isAssignableFrom(returnValue.getClass())) { ResponseEntity<?> responseEntity = (ResponseEntity<?>) returnValue; outputMessage.setStatusCode(responseEntity.getStatusCode()); outputMessage.getHeaders().putAll(responseEntity.getHeaders()); returnValue = responseEntity.getBody(); if (returnValue == null) { mavContainer.setRequestHandled(true); return; // <--- here, return directly without flushing headers. } }
But I'm not sure it was intentional or just a oversight ;)
Affects: 4.3 RC2
Referenced from: commits 22c260f, 7e95cd8, f20f6c9
The text was updated successfully, but these errors were encountered:
Lifu Zhou commented
I've created a PR : #1069
Sorry, something went wrong.
rstoyanchev
No branches or pull requests
Lifu Zhou opened SPR-14315 and commented
If a controller method's specification were:
and returns:
Then, the headers would be lost because they weren't flushed after not null check:
But I'm not sure it was intentional or just a oversight ;)
Affects: 4.3 RC2
Referenced from: commits 22c260f, 7e95cd8, f20f6c9
The text was updated successfully, but these errors were encountered: