| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
When using soup_session_send() or soup_session_send_async(), propagate
underlying GErrors to the caller, rather than constructing fake
SOUP_HTTP_ERROR errors.
|
| |
|
|
|
|
|
|
| |
Clients can specify a priority for each message added to the SoupSession,
which will determine the order in which it is processed by the
session's message processing queue.
https://bugzilla.gnome.org/show_bug.cgi?id=696277
|
| |
|
|
|
|
|
|
| |
Every year or two some bug comes up that makes libsoup retry a request
infinitely. (Also, apps can do this on their own by not paying
attention to the "retrying" flag in SoupSession::authenticate.) Move
the "too many redirects" code and rework it to handle all possible
cases of "message gets resent a suspicious number of times".
|
| |
|
|
|
|
|
|
|
|
|
|
| |
SoupMessageQueueItem's proxy_addr and proxy_uri fields were no longer
being used, but they were still there, and SoupSession was trying to
use item->proxy_uri to provide clarifying information on
SOUP_STATUS_CANT_RESOLVE_PROXY / SOUP_STATUS_CANT_CONNECT_PROXY.
Remove the unused fields, and fix SoupSession to get the proxy name
from the SoupConnection instead.
https://bugzilla.gnome.org/show_bug.cgi?id=680273
|
| |
|
|
|
|
| |
Move the SoupCache special handling from SoupRequestHTTP to
SoupSession (as another step towards making SoupCache not such a
magical special case hack that only works in certain situations).
|
| |
|
|
|
|
|
|
|
|
|
| |
In gio-based APIs, async vs sync is a function-level distinction, not
a class-level distinction. Merge most of the existing SoupSessionAsync
and SoupSessionSync code up into SoupSession, and make SoupSession
non-abstract, so that you can create a SoupSession and then use either
sync or async SoupRequest-based APIs on it. (The traditional APIs
still require one of the traditional subclasses, although the code
reorg does affect them in some ways, such as making SoupSessionAsync
more thread-safe.)
|
| |
|
|
|
|
|
| |
Move soup_message_queue_item_set_connection() into SoupSession, since
connection management is the session's job, not the queue's. Likewise,
move the non-queue-item-specific parts of queue_message_restarted()
into SoupSession.
|
| | |
|
| |
|
|
|
|
|
|
| |
When a soup_request_send_async() gets cancelled, we were leaving its
GSource active, causing it to be triggered later, sometimes causing
criticals. Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=683404
|
| |
|
|
|
| |
The only thing STARTING did was move directly into
AWAITING_CONNECTION, so there's no need for two separate states.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Push the proxy resolution code from SoupSession down into
SoupConnection and SoupSocket. If using a SoupProxyResolverDefault,
just enable proxy support on the GSocketClient instead (after adding
"http" as an application protocol). This way we get support for SOCKS
proxies (and any other proxies supported by GProxy types).
https://bugzilla.gnome.org/show_bug.cgi?id=553269
|
| |
|
|
|
|
|
|
|
|
| |
Kill SoupHTTPInputStream, and have SoupHTTPRequest return the
message's body_istream directly (with a little help from SoupSession
and its subclasses). SoupHTTPRequest works synchronously now as well
(though it's still the case that async only works with
SoupSessionAsync and sync only works with SoupSessionSync).
https://bugzilla.gnome.org/show_bug.cgi?id=591739
|
| |
|
|
|
|
| |
Proxy the new GSocketClient::event signal and emit it on SoupMessage,
when relevant, to allow (a) debugging, (b) status messages, (c) request
timing, (d) fiddling with sockets
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a SoupSession flag telling it to use
g_main_context_get_thread_default() on a per-message basis, rather
than using a single GMainContext for everything. In the simple case,
this is just more glib-like API. In the more complicated case, it
allows synchronously sending one or more messages on a
SoupSessionAsync without running the main GMainLoop.
https://bugs.webkit.org/show_bug.cgi?id=68238
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=651146
|
| |
|
|
| |
and remove libsoup's built-in TLS support, which is no longer needed
|
| |
|
|
|
|
|
|
|
|
| |
Make the sessions more state-machiney and fix up
soup_session_cancel_message() by having it set the message to the
(new) FINISHING state and letting the session implementation pick it
up from there. Remove the remaining "finished" and "restarted" signal
handlers; move the base session's "finished" handler to
"soup_session_unqueue_item" and call that from the right places in the
subclasses.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than having connections be independent until a message is
actually sent on them, assign them to queue items when they're created
for them. This means that, eg, if another connection frees up while
we're waiting for the first connection to connect, that we can't take
advantage of that. But it simplifies a ton of other things.
Also, if a new connection fails, don't fail every other message on
that host; let them succeed or fail independently. When doing a
CONNECT though, keep track of the queue item that necessitated it so
we can error that out if the CONNECT fails, just like we would if the
actual soup_connection_connect() had failed.
https://bugzilla.gnome.org/show_bug.cgi?id=619633
|
| |
|
|
|
|
| |
SoupMessageIOStatus was always really more about the session than the
message. (SoupServer I/O didn't use it at all.) Replace it with a new
SoupMessageQueueItemState, on the queue item rather than the message.
|
| |
|
|
|
|
| |
push SoupMessageQueueItem down into soup-message-io, and end the I/O
process by calling a completion callback rather than emitting the
SoupMessage signals directly, which gives the session greater control.
|
| |
|
|
|
|
| |
and add a test to redirect-test
https://bugzilla.gnome.org/show_bug.cgi?id=604383
|
| |
|
|
|
|
|
| |
Simplifies implementations, allows for non-http proxy resolution, and
allows authentication information to be passed.
http://bugzilla.gnome.org/show_bug.cgi?id=580051
|
| |
|
|
|
|
|
| |
Move CONNECT handling from SoupConnection to SoupSession so it works
more like other requests. Generally clean up and simplify
SoupConnection, and simplify the coordination between SoupSession and
its subclasses.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we went to some effort to resolve the message URI hostname
to an IP address before figuring out proxies/connections, but this
turns out to be wrong for multiple reasons:
1. Some hosts that send all requests via proxy don't even have a
working DNS config.
(http://bugzilla.gnome.org/show_bug.cgi?id=577532)
2. Apparently no one expects hostnames in requests to be matched
against IP addresses in proxy ignore lists anyway.
3. The big web browsers all implement connection limits on a
per-hostname basis, not a per-IP basis, and some web pages take
advantage of this by using multiple aliases for the same host
to get around the connection limit.
Also update tests/proxy-test to verify that the hostname is not
resolved when passing a request to a proxy.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libsoup-2.4.pc.in: rename from libsoup.pc.in; the attempt to
keep the source tree API-version-generic wasn't really working,
and we're probably not ever going to change the API version again
anyway.
* Makefile.am (pkgconfig_DATA): install the .pc file the normal
way rather than using an install-data-local rule to rename the .pc
file as we install it
* libsoup/Makefile.am (libsoupincludedir):
* tests/Makefile.am (LIBS):
* docs/reference/Makefile.am (GTKDOC_LIBS): Say "2.4" everywhere,
instead of 2.4 in some places and $(SOUP_API_VERSION) in others.
* configure.in: updates for .pc renaming. Also, use
AS_HELP_STRING() in AC_ARG_ENABLE() and AC_ARG_WITH() rules
svn path=/trunk/; revision=1193
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libsoup/soup-proxy-resolver.c: new abstract base class for a
SoupSessionFeature that determines what proxy to use for a given
URI.
* libsoup/soup-proxy-resolver-static.c: a SoupProxyResolver that
always returns the same value.
* libsoup/soup-session.c (set_property, get_property): implement
the SOUP_SESSION_PROXY_URI property by creating/destroying a
SoupProxyResolverStatic as needed.
(soup_session_get_connection): Use the proxy address passed by the
caller rather than priv->proxy_uri.
* libsoup/soup-session-async.c (run_queue): if the session has a
proxy resolver, use it, and pass the resolved proxy to
soup_session_get_connection().
(request_restarted): clear the previously-resolved proxy address
when restarting the message
* libsoup/soup-session-sync.c (wait_for_connection): if the
session has a proxy resolver, use it, and pass the resolved proxy
to soup_session_get_connection().
* libsoup/soup-message-queue.h (SoupMessageQueueItem): add
proxy-address-resolving fields
* libsoup/soup-status.c (soup_status_proxify): moved from
soup-connection; turn SOUP_STATUS_CANT_RESOLVE into
SOUP_STATUS_CANT_RESOLVE_PROXY, and SOUP_STATUS_CANT_CONNECT into
SOUP_STATUS_CANT_CONNECT_PROXY (and pass all other statuses
through unchanged)
svn path=/trunk/; revision=1192
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libsoup/soup-connection.c: Change the SoupURI properties to
SoupAddress properties.
* libsoup/soup-address.c (soup_address_resolve_async)
(soup_address_resolve_sync): Redo slightly so that multiple
simultaneous attempts to resolve the same address won't cause
problems.
(soup_address_hash_by_name, soup_address_equal_by_name):
(soup_address_hash_by_ip, soup_address_equal_by_ip): methods to
hash addresses by name or IP address
* libsoup/soup-message.c (soup_message_get_address): gets a
SoupAddress corresponding to the message's URI
* libsoup/soup-auth-manager.c (SoupAuthHost): hash hosts by
soup_address_hash_by_name() rather than by URI.
* libsoup/soup-session.c (soup_session_get_connection): pass
addresses to soup_connection_new(), not URIs.
(SoupSessionHost): hash hosts by soup_address_hash_by_ip() rather
than by URI. This requires that the addresses will have already
been resolved by the SoupSession subclasses before calling
soup_session_get_connection(), but also means that now requests
made to different virtual hosts on the same IP address can share a
connection.
* libsoup/soup-message-queue.c (SoupMessageQueueItem): add
address-resolving state
* libsoup/soup-session-sync.c (process_queue_item): resolve the
message's address before getting a connection
* libsoup/soup-session-async.c (run_queue, resolve_msg_addr)
(resolved_msg_addr): resolve the message's address before getting
a connection
(request_restarted): if the message gets requeued to a different
host, we'll need to re-resolve the address.
* libsoup/soup-uri.c (soup_uri_copy_root, soup_uri_host_hash)
(soup_uri_host_equal): No longer needed
* libsoup/soup-dns.c (do_async_callback): disconnect from the
cancellable before invoking the callback
* tests/proxy-test.c (tests): fix the 403 example; hostnames are
resolved by the session now, even when sending to a proxy, so we
need to use a hostname that actually exists
svn path=/trunk/; revision=1179
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libsoup/soup-message-queue.c: Make this more complicated, with a
SoupMessageQueueItem to keep track of the session's per-message
state. (Part of the process of moving session-related state out of
SoupMessagePrivate.)
* libsoup/soup-session.c: Update to work in terms of
SoupMessageQueueItem
* libsoup/soup-session-async.c:
* libsoup/soup-session-sync.c: use SoupMessageQueueItem (and get
rid of SoupSessionAsyncQueueData and SoupSessionSyncAsyncData).
svn path=/trunk/; revision=1178
|
| |
|
|
|
|
| |
* Merge libsoup-2.4 branch to trunk
svn path=/trunk/; revision=1041
|
| |
|
|
|
|
|
|
|
| |
2007-05-16 Jonathon Jongsma <jjongsma@gnome.org>
* libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
headers so that libsoup can be used from C++ programs. #438776
svn path=/trunk/; revision=925
|
| |
|
|
|
|
|
| |
* libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
prototypes, etc
* docs/reference/*: update, fix, etc
|
|
|
* libsoup/soup-session.c: First draft at the new object to
maintain formerly-global state. (Not yet complete; still need to
get rid of SoupContext).
* libsoup/soup-message-queue.c: Data structure used by SoupSession
* libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
some bits went into soup-connection.
* libsoup/soup-connection.c (soup_connection_send_request): New,
to send a request on a connection. The connection updates its
internal state and then hands off to soup_message_send_request.
(request_done): Callback set up by soup_connection_send_request.
Marks the connection as no-longer-in-use, and disconnects it if
the message says to.
(soup_connection_set_in_use, soup_connection_mark_old): No longer
needed; the connection takes care of this itself now.
(soup_connection_new_proxy): New, to create a new connection that
is explicitly marked as being through an HTTP proxy.
(soup_connection_new_tunnel): New, to create a new HTTPS
connection through a proxy. (Includes the code to send the
CONNECT.)
* libsoup/soup-context.c (try_existing_connections): Don't need to
call soup_connection_set_in_use.
(try_create_connection): Use soup_connection_new,
soup_connection_new_proxy, or soup_connection_new_tunnel as
appropriate.
* libsoup/soup-message.c (soup_message_prepare): Replaces
queue_message.
(soup_message_queue, soup_message_requeue, soup_message_prepare):
Gone. This must be done via a SoupSession now.
(soup_message_set_connection): don't need to mark in_use/not
in_use. Also, msg->priv->socket is gone now.
(soup_message_get_socket): Gone.
* libsoup/soup-message-handlers.c (soup_message_run_handlers):
Remove references to global handlers.
(redirect_handler, authorize_handler): Moved to soup-session.c.
* libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
session to shut down now.
* libsoup/soup.h: add soup-session.h
* libsoup/Makefile.am: updates
* tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
SoupSession.
|