diff options
author | Dan Winship <danw@gnome.org> | 2008-03-15 09:52:35 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2009-12-16 15:40:29 +0100 |
commit | 35e78b4ded68e5d6550d51ec161ff0034fd3736b (patch) | |
tree | e1f159185ed8ac8fcc8ceeef096b0b280f36c65c /tests/get.c | |
parent | 5a6e1e873e13e1bc77298b501ff6f7a66fadcb63 (diff) | |
download | libsoup-35e78b4ded68e5d6550d51ec161ff0034fd3736b.tar.gz |
Content-Encoding support
Adds SoupContentDecoder, which provides support for decoding "gzip"
Content-Encoding. For now other types are not supported and can't be
added. The SoupCoding interface is private because it will eventually
be replaced with something GConverter-based.
https://bugzilla.gnome.org/show_bug.cgi?id=522772
Diffstat (limited to 'tests/get.c')
-rw-r--r-- | tests/get.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/get.c b/tests/get.c index b0e5c576..98f66f6e 100644 --- a/tests/get.c +++ b/tests/get.c @@ -48,6 +48,11 @@ get_url (const char *url) printf ("%s %s HTTP/1.%d\n\n", method, path, soup_message_get_http_version (msg)); + soup_message_headers_iter_init (&iter, msg->request_headers); + while (soup_message_headers_iter_next (&iter, &hname, &value)) + printf ("%s: %s\r\n", hname, value); + printf ("\n"); + printf ("HTTP/1.%d %d %s\n", soup_message_get_http_version (msg), msg->status_code, msg->reason_phrase); @@ -145,6 +150,7 @@ main (int argc, char **argv) #ifdef HAVE_GNOME SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26, #endif + SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER, SOUP_SESSION_USER_AGENT, "get ", NULL); } else { @@ -153,6 +159,7 @@ main (int argc, char **argv) #ifdef HAVE_GNOME SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26, #endif + SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER, SOUP_SESSION_USER_AGENT, "get ", NULL); } |