Skip to content
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

Show error on wrong token #419

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Show error on wrong token #419

merged 1 commit into from
Aug 26, 2020

Conversation

sumeetpatil
Copy link
Contributor

@sumeetpatil sumeetpatil commented Aug 25, 2020

setExpectContinueEnabled is added to get rid of broken pipe exception.
The PUT/POST is sent with a huge payload with the header X-Vulas-Token. If the Token is invalid the server quickly closes the connection, the client still tries to send a payload even when the connection was closed at the server end which causes broken pipe exception. Expect Continue is introduced in HTTP 1.1 and handles this well as it just sends the headers and tries to validate if there is any failure, if there is no failure it sends the whole payload.
ExpectContinue is part of HTTP 1.1 spec
More details - https://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/methods/ExpectContinueMethod.html

@sumeetpatil sumeetpatil merged commit 06f6c52 into master Aug 26, 2020
@henrikplate henrikplate deleted the forbidden-exception branch August 27, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants