summaryrefslogtreecommitdiff
path: root/libsoup
Commit message (Collapse)AuthorAgeFilesLines
* connection: always handle http proxiesCarlos Garcia Campos2022-08-231-7/+8
| | | | | | | | 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
* soup-version: Fix duplicate externPatrick Griffis2022-08-151-1/+1
| | | | Closes #295
* build: Bump and document soversionPatrick Griffis2022-08-151-1/+0
|
* Use the project deprecation macrosEmmanuele Bassi2022-08-151-5/+5
| | | | | This way we ensure every symbol gets exported, even when deprecated, and that deprecation warnings can be disabled.
* Add own wrappers for deprecation macrosEmmanuele Bassi2022-08-151-0/+46
| | | | | | | 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.
* server: do not try to use server io after soup_server_message_finish()Carlos Garcia Campos2022-08-121-6/+8
| | | | Message finish can destroy the server io.
* server: add http/2 debug messagesCarlos Garcia Campos2022-08-122-1/+52
|
* http2: add HTTP/2 utils with common functions and enumsCarlos Garcia Campos2022-08-125-221/+186
|
* server: add initial support for HTTP/2Carlos Garcia Campos2022-08-128-9/+902
| | | | For now the plan is to use it only for testing the client APIs.
* server: deprecate soup_server_message_pause/unpause methodsCarlos Garcia Campos2022-08-125-12/+42
| | | | | They don't use the server at all, they just call soup_server_message_pause/unpause, so we can make them public instead.
* server: replace soup_server_connection_setup_async with ↵Carlos Garcia Campos2022-08-123-73/+20
| | | | | | | | | 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.
* server: make server clients be the connections and not the messagesCarlos Garcia Campos2022-08-125-94/+174
| | | | | | | | | | | | 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.
* soup-server-message: add connected signalCarlos Garcia Campos2022-08-122-2/+40
| | | | | Emitted when the connection is connected and the TLS handshake completed. Use connection connected signal to set the IO data.
* server: add SoupServerMessageIO interfaceCarlos Garcia Campos2022-08-1210-123/+265
|
* server: move io data ownership from SoupServerMessage to SoupServerConnectionCarlos Garcia Campos2022-08-126-17/+64
|
* server: move server io to http1 directory and split the structCarlos Garcia Campos2022-08-123-81/+113
|
* server-message: remove socket, local_addr and remote_addr membersCarlos Garcia Campos2022-08-122-35/+10
| | | | They can just be get from the connection.
* server: split SoupSocket into SoupListener and SoupServerConnectionCarlos Garcia Campos2022-08-1211-1048/+1252
|
* soup-session: Mark soup_session_new() as "transfer full"Chris Talbot2022-08-101-1/+1
| | | | | soup_session_new() returns a new GObject, so it should be marked as "transfer full"
* http2: handle the case of last stream id being max int32 in goawayCarlos Garcia Campos2022-06-301-0/+3
| | | | | | | | 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
* connection: do not advertise h2 protocol for proxy connectionsCarlos Garcia Campos2022-06-291-1/+2
| | | | We don't support http/2 proxies yet.
* http2: fix runtime warnings when request fails due to IO errorCarlos Garcia Campos2022-06-281-1/+29
| | | | | | | | | | | | | (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.
* Fix typo in docsMichael Catanzaro2022-06-241-1/+1
|
* Fix typos in debug messagesMichael Catanzaro2022-06-221-3/+3
|
* session: remove the asserts to ensure session is disposed in the same thread ↵Carlos Garcia Campos2022-06-081-4/+0
| | | | it was created
* connection: attach the idle timeout source to the session contextCarlos Garcia Campos2022-06-084-18/+40
| | | | | | | 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.
* session: remove the features cacheCarlos Garcia Campos2022-06-081-17/+1
| | | | | | 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.
* Use GWeakRef instead of g_object_add_weak_pointer()Carlos Garcia Campos2022-06-089-95/+187
| | | | GWeakRef is thread safe
* logger: remove soup_logger_request_body_setup()Carlos Garcia Campos2022-06-083-69/+8
| | | | | We can use the same approach as http2 backend and call soup_logger_log_request_data() from the body stream wrote data callback.
* logger: make SoupLogger thread safeCarlos Garcia Campos2022-06-081-1/+31
|
* hsts: Make SoupHSTSEnforcer thread safeCarlos Garcia Campos2022-06-081-5/+21
|
* cookies: make SoupCookieJar thread safeCarlos Garcia Campos2022-06-081-2/+32
|
* cache: make SoupCache thread safeCarlos Garcia Campos2022-06-081-5/+50
|
* http2: make message IO thread safeCarlos Garcia Campos2022-06-086-25/+96
| | | | | | | | | | | | | 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.
* http2: do not perform sync IO when body stream needs more dataCarlos Garcia Campos2022-06-082-3/+5
| | | | | Add blocking parameter to SoupBodyInputStreamHttp2::need-more-data and only do sync IO when input stream read is blocking too.
* connection-manager: protect connections handling with a mutexCarlos Garcia Campos2022-06-082-46/+125
| | | | | Also use a condition for sync requests to wait until a connection is available.
* connection: make state and in_use member atomicsCarlos Garcia Campos2022-06-081-22/+23
|
* auth-manager: Add a mutex to protect accessing the auth hostsCarlos Garcia Campos2022-06-081-2/+34
|
* session: make message queue handling thread safeCarlos Garcia Campos2022-06-085-22/+172
| | | | | Ensure that queue items are only processed in the same thread they were created.
* Move connection handling from SoupSession to new object SoupConnectionManagerCarlos Garcia Campos2022-06-085-517/+568
| | | | Also reuse the host address for connections to the same host.
* session: remove unsused num_messages from SoupSessionHostCarlos Garcia Campos2022-06-081-10/+0
|
* http2: remove Host and Connection headers from request after a redirect from ↵Carlos Garcia Campos2022-06-071-2/+6
| | | | | | | | 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
* http2: move debug message about request body data read after early returnCarlos Garcia Campos2022-06-021-2/+2
| | | | | In case of cancellation the SoupHTTP2MessageData might have already been destroyed.
* soup-auth-manager: remove authenticate signalCarlos Garcia Campos2022-06-011-34/+0
| | | | | | | | 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.
* soup-auth-manager: SoupAuthNTLM has no 'host' propertyMilan Crha2022-05-241-1/+4
| | | | Correct a typo in the property name, it should be 'authority' instead.
* docs: Update soup_server_listen() to be more clearPatrick Griffis2022-05-231-1/+1
| | | | This API doesn't listen on both ipv4/ipv6 but other APIs do.
* server-message: proxy the peer-certificate and peer-certificate-errorsIgnacio Casal Quinteiro2022-05-174-0/+201
|
* negotiate: add link to RFC 4559Michael Catanzaro2022-05-061-1/+2
| | | | | Understanding that RFC 4559 exists would help anybody reading the API docs, and also anybody working on this file.
* negotiate: don't print warnings if response is HTTP 200Michael Catanzaro2022-05-061-3/+14
| | | | | | | | | | | | | 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
* negotiate: don't request mutual authenticationMichael Catanzaro2022-05-061-1/+1
| | | | | | | | 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