summaryrefslogtreecommitdiff
path: root/libsoup/soup-logger.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2009-04-03 00:25:51 +0000
committerDan Winship <danw@src.gnome.org>2009-04-03 00:25:51 +0000
commit2775879351028fe0f1a1387150f212d72f806bb6 (patch)
treebb108da2cd7e5f7fbe1b3c8dcddcb3de3d3d0205 /libsoup/soup-logger.c
parente9ba1d1933517fa83bfefe7c6de52f0715f62b40 (diff)
downloadlibsoup-2775879351028fe0f1a1387150f212d72f806bb6.tar.gz
Bug 576760 – soup_message_headers_get_content_type returns bad headers
* libsoup/soup-message-headers.c (soup_message_headers_get_one) (soup_message_headers_get_list): New replacements for soup_message_headers_get(), indicating explicitly whether the caller expects the header to be a list or not; for non-list-type headers, if there's more than one, the second one should be ignored rather than concatenated to the first. (soup_message_headers_get): deprecate this. * libsoup/*.c: * tests/*.c: Update to use soup_message_headers_get_one() or _get_list() as appropriate. * tests/header-parsing.c (do_content_type_tests): Add some tests of Content-Type parsing/setting, including making sure that duplicate Content-Type headers are ignored. * docs/reference/libsoup-2.4-sections.txt: update svn path=/trunk/; revision=1258
Diffstat (limited to 'libsoup/soup-logger.c')
-rw-r--r--libsoup/soup-logger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsoup/soup-logger.c b/libsoup/soup-logger.c
index bb984411..b38cb87b 100644
--- a/libsoup/soup-logger.c
+++ b/libsoup/soup-logger.c
@@ -487,7 +487,7 @@ print_request (SoupLogger *logger, SoupMessage *msg,
if (log_level == SOUP_LOGGER_LOG_MINIMAL)
return;
- if (!soup_message_headers_get (msg->request_headers, "Host")) {
+ if (!soup_message_headers_get_one (msg->request_headers, "Host")) {
soup_logger_print (logger, SOUP_LOGGER_LOG_HEADERS, '>',
"Host: %s%c%u", uri->host,
soup_uri_uses_default_port (uri) ? '\0' : ':',