Skip to content

goahttpclient: Do not abort soup session on certificate error

Milan Crha requested to merge wip/httpclient-deadlock into master

Calling soup_session_abort() within http_client_accept_certificate(), means the soup session also cancels the associated cancellable, which invokes http_client_check_cancelled_cb(), which also calls soup_session_abort(), but it asks for a lock, which it already has. The http_client_accept_certificate() can simply return FALSE to stop further processing, which it does.

The side-effect is also that the cancelled error has a precedence over the TLS error, meaning the dialog behaved like the user cancelled it, even he/she did not. The user could not know that there's a certificate problem.

Merge request reports