Pull over some new test programs from the soup-refactoring branch,
authorDan Winship <danw@src.gnome.org>
Tue, 12 Aug 2003 16:00:31 +0000 (16:00 +0000)
committerDan Winship <danw@src.gnome.org>
Tue, 12 Aug 2003 16:00:31 +0000 (16:00 +0000)
commitba90a2e60ef012598c5c2ce74cdbb7b3c1148bb5
treefef90f656a4fb99fed2c4af65fef89a4b025fb99
parent6057a20ae38de7fabf9fa673f24fbfe0a09b005a
Pull over some new test programs from the soup-refactoring branch,
along with the SoupUri changes they depend on.

* tests/simple-httpd.c: A really simple HTTP server, to test the
server code.

* tests/simple-proxy.c: An even simpler HTTP proxy

* tests/get.c: Add "-r" flag to recursively get files (thereby
testing multiple-connections-at-once code). Also good for setting
up a tree to use with simple-httpd.

* tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
normal case)

* tests/uri-parsing.c: Regression test for the new soup-uri.c

* libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
pull in some optimizations from camel-url. Also, make SoupProtocol
a GQuark so we can still compare them with ==, but we can also
recognize any protocol.
(soup_uri_new_with_base): New, to merge base and relative URIs
(soup_uri_to_string): Update this. Change the "show_password" flag
(which we always passed FALSE for) to "just_path", for places that
want the path+query without the protocol, host, etc.

* libsoup/soup-queue.c (soup_get_request_header): Just use
soup_uri_to_string to generate the request URI.

* libsoup/soup-auth.c (compute_response, digest_auth_func): Use
"soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
the URI by hand badly.
* libsoup/soup-server-auth.c (parse_digest): Likewise

* libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
switch() to an series of if()s since SOUP_PROTOCOL_* aren't
constants any more.

* libsoup/soup-context.c (soup_context_uri_hash,
soup_context_uri_equal): s/querystring/query/
15 files changed:
ChangeLog
libsoup/soup-auth.c
libsoup/soup-context.c
libsoup/soup-queue.c
libsoup/soup-server-auth.c
libsoup/soup-socks.c
libsoup/soup-uri.c
libsoup/soup-uri.h
tests/.cvsignore
tests/Makefile.am
tests/get.c
tests/simple-httpd.c [new file with mode: 0644]
tests/simple-proxy.c [new file with mode: 0644]
tests/timeserver.c
tests/uri-parsing.c [new file with mode: 0644]