}
priv->http_version = priv->orig_http_version;
- if (priv->tls_certificate) {
- g_object_unref (priv->tls_certificate);
- priv->tls_certificate = NULL;
- }
- priv->tls_errors = 0;
-
g_object_notify (G_OBJECT (req), SOUP_MESSAGE_STATUS_CODE);
g_object_notify (G_OBJECT (req), SOUP_MESSAGE_REASON_PHRASE);
g_object_notify (G_OBJECT (req), SOUP_MESSAGE_HTTP_VERSION);
void
soup_message_set_https_status (SoupMessage *msg, SoupConnection *conn)
{
- SoupSocket *sock = soup_connection_get_socket (conn);
+ SoupSocket *sock;
+ sock = conn ? soup_connection_get_socket (conn) : NULL;
if (sock && soup_socket_is_ssl (sock)) {
GTlsCertificate *certificate;
GTlsCertificateFlags errors;
soup_message_finished (item->msg);
if (item->related->msg->status_code)
item->related->state = SOUP_MESSAGE_FINISHING;
+ else
+ soup_message_set_https_status (item->related->msg, item->conn);
do_idle_run_queue (session);
soup_message_queue_item_unref (item->related);
if (SOUP_STATUS_IS_SUCCESSFUL (status)) {
if (!soup_connection_start_ssl_sync (conn, related->cancellable))
status = SOUP_STATUS_SSL_FAILED;
- soup_message_set_https_status (item->msg, conn);
+ soup_message_set_https_status (related->msg, conn);
}
if (!SOUP_STATUS_IS_SUCCESSFUL (status))
goto try_again;
}
+ soup_message_set_https_status (msg, item->conn);
+
if (!SOUP_STATUS_IS_SUCCESSFUL (status)) {
if (!msg->status_code)
soup_session_set_item_status (session, item, status);
msg->status_code, msg->reason_phrase,
expected_status,
soup_status_get_phrase (expected_status));
+ if (msg->status_code == SOUP_STATUS_SSL_FAILED) {
+ GTlsCertificateFlags flags = 0;
+
+ soup_message_get_https_status (msg, NULL, &flags);
+ debug_printf (1, " tls error flags: 0x%x\n", flags);
+ }
errors++;
}
g_object_unref (msg);