-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
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
Propagate reason phrase of aborted request in JAX-RS Client #22994
Propagate reason phrase of aborted request in JAX-RS Client #22994
Conversation
Thanks! |
Can you please rebase the PR onto Thanks |
This will need another rebase when #22997 is in. |
dfc7945
to
cee965e
Compare
240eded
to
a095e36
Compare
OK, I rebased again after #22997 was in |
Great, thanks! |
@FroMage @sberyozkin @michalszynkiewicz I know we had concerns at some point about security and propagating exception information. Could you have a look at this one and make sure it's not an issue? Better safe than sorry. |
if (value == null) { | ||
responseContext.setEntityStream(null); | ||
return; | ||
private void propagateAbortedWithEntityToResponse(RestClientRequestContext restClientRequestContext) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do I read it correctly that from this line there's no real change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, it's just a minor refactoring
Security-wise, I think this is safe |
Agreed. |
@michalszynkiewicz @FroMage thanks for checking! |
@michalszynkiewicz I let you merge it if you're happy with @fwippe 's answer. |
+1, it is only part of the HTTP response status info |
Thanks! |
This PR complements #22859 by providing the reason phrase of aborted requests in addition to their status code.
@geoand I hope you don't mind that I renamed method
setExistingEntity
topropagateAbortedWithEntityToResponse
(I can undo that change otherwise, no problem). Please note, that the previous test inClientRequestFilterAbortWithTestCase
didn't check the code part whereRestClientRequestContext.isCheckSuccessfulFamily == true
. I added such a test so that we now cover both cases.