From af2249b211764077d659c59fb857245f5c73a00d Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Sat, 21 Jul 2012 22:50:43 +0200 Subject: [PATCH] http-conn: pass all HTTP headers into callback function --- src/core/http-conn.c | 3 +-- src/core/http-conn.h | 2 +- src/core/sipe-ews.c | 6 +++--- src/core/sipe-svc.c | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/http-conn.c b/src/core/http-conn.c index ff6712cf..e77c7db6 100644 --- a/src/core/http-conn.c +++ b/src/core/http-conn.c @@ -528,7 +528,6 @@ http_conn_process_input_message(HttpConn *http_conn, /* Other response */ else { const char *set_cookie_hdr; - const char *content_type = sipmsg_find_header(msg, "Content-Type"); http_conn->retries = 0; /* Set cookies. @@ -562,7 +561,7 @@ http_conn_process_input_message(HttpConn *http_conn, } if (http_conn->callback) { - (*http_conn->callback)(msg->response, msg->body, content_type, http_conn, http_conn->data); + (*http_conn->callback)(msg->response, msg->body, msg->headers, http_conn, http_conn->data); } } } diff --git a/src/core/http-conn.h b/src/core/http-conn.h index d354e488..9d1b8f7e 100644 --- a/src/core/http-conn.h +++ b/src/core/http-conn.h @@ -50,7 +50,7 @@ typedef struct http_conn_struct HttpConn; typedef struct http_session_struct HttpSession; /** callback */ -typedef void (*HttpConnCallback) (int return_code, const char *body, const char *content_type, +typedef void (*HttpConnCallback) (int return_code, const char *body, GSList* headers, HttpConn *conn, void *data); /** diff --git a/src/core/sipe-ews.c b/src/core/sipe-ews.c index 3dc36056..a0d22646 100644 --- a/src/core/sipe-ews.c +++ b/src/core/sipe-ews.c @@ -178,7 +178,7 @@ sipe_ews_run_state_machine(struct sipe_calendar *cal); static void sipe_ews_process_avail_response(int return_code, const char *body, - SIPE_UNUSED_PARAMETER const char *content_type, + SIPE_UNUSED_PARAMETER GSList *headers, HttpConn *conn, void *data) { @@ -294,7 +294,7 @@ Envelope/Body/GetUserAvailabilityResponse/FreeBusyResponseArray/FreeBusyResponse static void sipe_ews_process_oof_response(int return_code, const char *body, - SIPE_UNUSED_PARAMETER const char *content_type, + SIPE_UNUSED_PARAMETER GSList *headers, HttpConn *conn, void *data) { @@ -381,7 +381,7 @@ sipe_ews_process_oof_response(int return_code, static void sipe_ews_process_autodiscover(int return_code, const char *body, - SIPE_UNUSED_PARAMETER const char *content_type, + SIPE_UNUSED_PARAMETER GSList *headers, HttpConn *conn, void *data) { diff --git a/src/core/sipe-svc.c b/src/core/sipe-svc.c index 0648c42b..3a08d350 100644 --- a/src/core/sipe-svc.c +++ b/src/core/sipe-svc.c @@ -126,7 +126,7 @@ void sipe_svc_session_close(struct sipe_svc_session *session) static void sipe_svc_https_response(int return_code, const gchar *body, - SIPE_UNUSED_PARAMETER const gchar *content_type, + SIPE_UNUSED_PARAMETER GSList *headers, HttpConn *conn, void *callback_data) { -- 2.11.4.GIT