tls-gnutls.c: Handle rehandshake error in _httpTLSRead#1508
Open
zdohnal wants to merge 2 commits intoOpenPrinting:masterfrom
Open
tls-gnutls.c: Handle rehandshake error in _httpTLSRead#1508zdohnal wants to merge 2 commits intoOpenPrinting:masterfrom
_httpTLSRead#1508zdohnal wants to merge 2 commits intoOpenPrinting:masterfrom
Conversation
Based on gnutls_record_send/recv man pages, we should use the return value of the functions as indicator what happened in the function and do not look into errno at all. Checking the errno value caused infinity loop in cupsd on busy servers if there were enough connection errors when cupsd wrote the response. The patch is provided by Paul Zirnik from SUSE - thank you for the patch! Fixes OpenPrinting#827
Member
Author
|
i see there is error - Looking into it. |
Per GNUTLS manual, `gnutls_record_recv()` can get GNUTLS_E_REHANDSHAKE and if it is HTTP client, we should not close the connection and ignore the error. The server can terminate the connection as before.
e256cb2 to
eebaba1
Compare
Member
Author
|
The openssl job failure is due #1450 . |
Member
Author
|
If the MR is okay to include, I will rebase the MR to include #1507 once that MR is merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(follows #1507 )
During the review of #1507 I was told there is gnutls error which would be great to handle it separately - GNUTLS_E_REHANDSHAKE - when receiving data.
There are several ways how to handle this based on which side the HTTP library is used on:
The MR ignores the error on client side and terminates connection on server side.