* @certificate: (out) (transfer none): @msg's TLS certificate
* @errors: (out): the verification status of @certificate
*
- * If @msg is using https, this retrieves the #GTlsCertificate
- * associated with its connection, and the #GTlsCertificateFlags showing
- * what problems, if any, have been found with that certificate.
+ * If @msg is using https (or attempted to use https but got
+ * %SOUP_STATUS_SSL_FAILED), this retrieves the #GTlsCertificate
+ * associated with its connection, and the #GTlsCertificateFlags
+ * showing what problems, if any, have been found with that
+ * certificate.
*
- * Return value: %TRUE if @msg uses https, %FALSE if not
+ * Return value: %TRUE if @msg used/attempted https, %FALSE if not
*
* Since: 2.34
*/
if (item->msg->status_code)
item->state = SOUP_MESSAGE_FINISHING;
- else
- soup_message_set_https_status (item->msg, item->conn);
+ soup_message_set_https_status (item->msg, item->conn);
if (!SOUP_STATUS_IS_SUCCESSFUL (status)) {
soup_connection_disconnect (conn);
SoupMessageQueueItem *item = user_data;
SoupSession *session = item->session;
+ soup_message_set_https_status (item->msg, item->conn);
+
if (status != SOUP_STATUS_OK) {
soup_connection_disconnect (conn);
if (item->state == SOUP_MESSAGE_CONNECTING) {
}
soup_session_set_item_connection (session, item, conn);
- soup_message_set_https_status (item->msg, item->conn);
if (soup_connection_get_state (item->conn) != SOUP_CONNECTION_NEW) {
item->state = SOUP_MESSAGE_READY;
+ soup_message_set_https_status (item->msg, item->conn);
return TRUE;
}
break;
case SOUP_MESSAGE_READY:
- soup_message_set_https_status (item->msg, item->conn);
if (item->msg->status_code) {
if (item->msg->status_code == SOUP_STATUS_TRY_AGAIN) {
soup_message_cleanup_response (item->msg);