diff options
author | Dan Winship <danw@src.gnome.org> | 2003-12-19 20:54:38 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-12-19 20:54:38 +0000 |
commit | e81e61c7612793a1fa20812c2a329726dd29a2c8 (patch) | |
tree | c7954ffdcff304ad30716a0db6a0fda5dd7838d4 /libsoup/soup-connection.h | |
parent | 654248bcf1cf2fc71d7df3e21cb7c551964b8a08 (diff) | |
download | libsoup-e81e61c7612793a1fa20812c2a329726dd29a2c8.tar.gz |
New. An interface for objects that want to act on every message passing
* libsoup/soup-message-filter.c: New. An interface for objects
that want to act on every message passing through a session.
(Initially being used for authentication, but could also be used
for cache handling, cookie management, etc.)
* libsoup/soup-connection.c (class_init, etc): Add a message
filter property.
(send_request): If the connection has a message filter set, run
it on the message before sending it.
(soup_connection_connect_async, etc): When setting up a tunnel, if
we get back a 407 and the session tries to requeue the message,
either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
whether or not the proxy closed the connection).
(soup_connection_connect_sync): Likewise
(send_request, request_done): Ref/unref the connection
* libsoup/soup-session.c (soup_session_get_type): Implement the
SoupMessageFilter interface.
(soup_session_get_connection): Use the session as the connection's
message filter
(soup_session_add_filter, soup_session_remove_filter): Add/remove
filters from the session
(setup_message): do auth handling, and call each of the session's
filters' setup_message methods as well.
(soup_session_send_message_via): No longer needed.
(connect_result): Handle SOUP_STATUS_TRY_AGAIN.
* libsoup/soup-session-async.c (run_queue): Use
soup_connection_send_request, since soup_session_send_message_via
is gone now.
* libsoup/soup-session-sync.c (send_message): Likewise
* libsoup/soup-message.c (soup_message_is_keepalive): A successful
response to a CONNECT is always keepalive, even if it's HTTP/1.0
with no Connection header.
* libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
* libsoup/soup-types.h: Add SoupMessageFilter, and macros for
gobject interface types.
* tests/get.c (main): Add a -p flag to specify a proxy
* tests/simple-proxy.c: Fix #includes
Diffstat (limited to 'libsoup/soup-connection.h')
-rw-r--r-- | libsoup/soup-connection.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsoup/soup-connection.h b/libsoup/soup-connection.h index d25b6a92..5d08b080 100644 --- a/libsoup/soup-connection.h +++ b/libsoup/soup-connection.h @@ -49,6 +49,7 @@ GType soup_connection_get_type (void); #define SOUP_CONNECTION_ORIGIN_URI "origin-uri" #define SOUP_CONNECTION_PROXY_URI "proxy-uri" #define SOUP_CONNECTION_SSL_CREDENTIALS "ssl-creds" +#define SOUP_CONNECTION_MESSAGE_FILTER "message-filter" SoupConnection *soup_connection_new (const char *propname1, ...); |