diff options
author | Dan Winship <danw@src.gnome.org> | 2003-06-03 20:38:38 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-06-03 20:38:38 +0000 |
commit | 0c5f03a037b5dd4d6761b86e4e4160421f056aac (patch) | |
tree | 315b5295fa37211aaadd74c41f43f2f135a517c8 /libsoup/soup-server-tcp.c | |
parent | 514012912dad15272f0788c4ece31fe073f3a318 (diff) | |
download | libsoup-soup-refactoring.tar.gz |
Push SoupContext into the background in preparation for itssoup-refactoring
eventual removal.
* libsoup/soup-message.c (soup_message_new,
soup_message_new_full): Take a SoupUri instead of a SoupContext
(soup_message_set_uri): instead of set_context
(redirect_handler): Use soup_message_set_uri
(soup_message_get_context): gone
* libsoup/soup-context.c (struct _SoupContext): Move this here. No
one else needs to know.
(soup_context_get): Gone
(soup_context_from_uri): constify uri
(get_proxy): moved here from soup-misc.c and made to return a
SoupUri.
(try_create_connection): Update for that.
* libsoup/soup-private.h: Remove struct _SoupContext def
* libsoup/soup-connection.c (soup_connection_new): constify uri
* libsoup/soup-proxy-connection.c (soup_proxy_connection_new):
constify uri arguments, remove SoupContext references
* libsoup/soup-misc.c (soup_get_proxy): Gone
* libsoup/soup-server-cgi.c (run_async): Use soup_message_set_uri, etc
* libsoup/soup-server-tcp.c (read_headers_cb): Likewise
* tests/*: update soup_message_new() calls
Diffstat (limited to 'libsoup/soup-server-tcp.c')
-rw-r--r-- | libsoup/soup-server-tcp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libsoup/soup-server-tcp.c b/libsoup/soup-server-tcp.c index 7bec72be..93085504 100644 --- a/libsoup/soup-server-tcp.c +++ b/libsoup/soup-server-tcp.c @@ -202,7 +202,7 @@ read_headers_cb (const GString *headers, { SoupServerTCPConnection *sconn = user_data; SoupMessage *msg = sconn->msg; - SoupContext *ctx; + SoupUri *uri; char *req_path = NULL; const char *length, *enc; @@ -239,10 +239,10 @@ read_headers_cb (const GString *headers, /* Generate correct context for request */ if (*req_path != '/') { - /* Should be an absolute URI. (If not, soup_context_get + /* Should be an absolute URI. (If not, soup_uri_new * will fail and return NULL. */ - ctx = soup_context_get (req_path); + uri = soup_uri_new (req_path); } else { SoupServerTCP *tcp = SOUP_SERVER_TCP (sconn->serv); const char *req_host; @@ -261,14 +261,14 @@ read_headers_cb (const GString *headers, req_host, tcp->priv->port, req_path); - ctx = soup_context_get (url); + uri = soup_uri_new (url); g_free (url); } - if (!ctx) + if (!uri) goto THROW_MALFORMED_HEADER; - soup_message_set_context (msg, ctx); - soup_context_unref (ctx); + soup_message_set_uri (msg, uri); + soup_uri_free (uri); g_free (req_path); |