| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
We don't want glib to handle http proxy connections for us, so also set
the http application proxy for socket client when using the default
proxy configuration.
Fixes #294
|
|
|
|
| |
Closes #295
|
| |
|
|
|
|
|
| |
This way we ensure every symbol gets exported, even when deprecated, and
that deprecation warnings can be disabled.
|
|
|
|
|
|
|
| |
We need to ensure that deprecated and unavailable symbols are still
exported, so we should use our own symbol.
While at it, the deprecation warnings should be toggleable.
|
|
|
|
| |
Message finish can destroy the server io.
|
| |
|
| |
|
|
|
|
| |
For now the plan is to use it only for testing the client APIs.
|
|
|
|
|
| |
They don't use the server at all, they just call
soup_server_message_pause/unpause, so we can make them public instead.
|
|
|
|
|
|
|
|
|
| |
soup_server_connection_accepted
Now that we have connected and request-started signals in the
connection, we no longer need the setup async function, we can just
notify the connection that it's been accepted and do the setup and tls
handshake.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Client list is now a list of connections, owned by the server. The
connection creates the messages and notifies the server with
request-started signal. The first message is created before the TLS
handshake, and then request-started is emitted to allow the user to
connect to accept-certificate signal on the message. If the connection
is persistent, the next request-started signal will be emitted if
there's an actual request from the client. This is a change in behavior,
before we always emitted the request-started when waiting for a new
request even if the request never actually started.
|
|
|
|
|
| |
Emitted when the connection is connected and the TLS handshake
completed. Use connection connected signal to set the IO data.
|
| |
|
| |
|
| |
|
|
|
|
| |
They can just be get from the connection.
|
| |
|
|
|
|
|
| |
soup_session_new() returns a new GObject, so it should be marked
as "transfer full"
|
|
|
|
|
|
|
|
| |
This means it's a graceful goaway and we should not allow new requests,
another goaway is expected with the actual last stream id that should be
processed.
Fixes #233
|
|
|
|
| |
We don't support http/2 proxies yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(get:18601): libsoup-WARNING **: 11:25:03.814: (../libsoup/soup-session.c:318):soup_session_dispose: runtime check failed: (soup_connection_manager_get_num_conns (priv->conn_manager) == 0)
(get:18601): libsoup-WARNING **: 11:25:03.814: (../libsoup/soup-connection-manager.c:78):soup_host_free: runtime check failed: (host->conns == NULL)
This happens because we increase the in use counter of the connection
when RST_STREAM message is sent, that is decreased when the frame is
actually sent. In case of IO error, like socket timeout, we fail to send
the RST_STREAM frame, and the in use counter of the connection is not
decreased. We now process all pending closed messages when a frame fails
to be sent due to session being closed.
|
| |
|
| |
|
|
|
|
| |
it was created
|
|
|
|
|
|
|
| |
The connection thread owner might change, so the context where the idle
timeout source was attached might be destroyed while the connection is
still alive. So, better use the session context always, since
disconnecting at idle state is always safe from the session thread.
|
|
|
|
|
|
| |
It's not thread safe and it's accessed by message IO from multiple
threads. Session features are not that many so iterating every time
should be fast enough.
|
|
|
|
| |
GWeakRef is thread safe
|
|
|
|
|
| |
We can use the same approach as http2 backend and call
soup_logger_log_request_data() from the body stream wrote data callback.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nghttp2 session can't be used by multiple threads at the same time, so
we need to ensure that only messages from the same thread share the
connection. Connections in idle state can be reused from other threads,
though but we need to ensure all the pending IO is completed before
switching to another thread. When the connection switches to IN_USE
state, the current thread becomes the owner of the connection IO. In the
case of HTTP/2 there might be session IO not related to a particular
message, in that case a thread with no default context is considered
synchronous and all IO that is not explicitly sync or async will be
sync.
|
|
|
|
|
| |
Add blocking parameter to SoupBodyInputStreamHttp2::need-more-data and
only do sync IO when input stream read is blocking too.
|
|
|
|
|
| |
Also use a condition for sync requests to wait until a connection is
available.
|
| |
|
| |
|
|
|
|
|
| |
Ensure that queue items are only processed in the same thread they were
created.
|
|
|
|
| |
Also reuse the host address for connections to the same host.
|
| |
|
|
|
|
|
|
|
|
| |
HTTP/1 to HTTP/2
Otherwise we get a protocol error since Host header is replaced by :authority pseudo-header field in HTTP/2.
Fixes #278
|
|
|
|
|
| |
In case of cancellation the SoupHTTP2MessageData might have already been
destroyed.
|
|
|
|
|
|
|
|
| |
This is a leftover from the soup3 redesign. The plan was to move the
authenticate signal from Session and SoupAuthManager to SoupMessage, but
I forgot to remove the signal declaration from SoupAuthManager. There's
no actual API break because we never emitted the signal, so this can't
break anything.
|
|
|
|
| |
Correct a typo in the property name, it should be 'authority' instead.
|
|
|
|
| |
This API doesn't listen on both ipv4/ipv6 but other APIs do.
|
| |
|
|
|
|
|
| |
Understanding that RFC 4559 exists would help anybody reading the API
docs, and also anybody working on this file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the server sends a success status code, then whatevs, we good. If
there's no WWW-Authenticate header, nothing more is required from us.
We're done.
If we get status code 200 and a WWW-Authenticate header that contains a
value, then go ahead and continue to try to handle it. The preexisting
code will print a warning if it's invalid, but treat is as success
anyway. The preexisting comment explains why this is necessary.
Fixes #184
|
|
|
|
|
|
|
|
| |
Trying to authenticate the server is cute, but it doesn't work in
practice on today's internet. Might as well not do it, because we have
to ignore errors if it fails.
Reference: #184
|