[libsoup/wip/remove-deprecations: 40/77] Remove deprecated SoupMessageBody API
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/remove-deprecations: 40/77] Remove deprecated SoupMessageBody API
- Date: Mon, 24 Aug 2020 19:17:21 +0000 (UTC)
commit 6ea7167512042bc8565a6022d49d49c6677811ba
Author: Patrick Griffis <pgriffis igalia com>
Date: Wed Feb 12 13:52:09 2020 -0800
Remove deprecated SoupMessageBody API
docs/reference/client-howto.xml | 6 +-----
libsoup/soup-message-body.c | 5 +----
libsoup/soup-message.c | 10 ----------
libsoup/soup-message.h | 15 ++++++---------
4 files changed, 8 insertions(+), 28 deletions(-)
---
diff --git a/docs/reference/client-howto.xml b/docs/reference/client-howto.xml
index ff96d0f3..1cc190a6 100644
--- a/docs/reference/client-howto.xml
+++ b/docs/reference/client-howto.xml
@@ -541,11 +541,7 @@ A few sample programs are available in the
<listitem><para>
<emphasis role="bold"><literal>simple-proxy</literal></emphasis> uses both the
client and server APIs to create a simple (and not very
- RFC-compliant) proxy server. It shows how to use the <link
- linkend="SoupMessageFlags"><literal>SOUP_MESSAGE_OVERWRITE_CHUNKS</literal></link>
- flag when reading a message to save memory by processing each
- chunk of the message as it is read, rather than accumulating
- them all into a single buffer to process all at the end.
+ RFC-compliant) proxy server.
</para></listitem>
</itemizedlist>
diff --git a/libsoup/soup-message-body.c b/libsoup/soup-message-body.c
index 0c45e18e..eb6d5f5a 100644
--- a/libsoup/soup-message-body.c
+++ b/libsoup/soup-message-body.c
@@ -351,8 +351,7 @@ G_DEFINE_BOXED_TYPE (SoupBuffer, soup_buffer, soup_buffer_copy, soup_buffer_free
* message body, @data is normally %NULL, and will only be filled in
* after soup_message_body_flatten() is called. For client-side
* messages, this automatically happens for the response body after it
- * has been fully read, unless you set the
- * %SOUP_MESSAGE_OVERWRITE_CHUNKS flags. Likewise, for server-side
+ * has been fully read. Likewise, for server-side
* messages, the request body is automatically filled in after being
* read.
*
@@ -404,8 +403,6 @@ soup_message_body_new (void)
* client-side message, or #SoupMessage:request_body of a server-side
* message), this will cause each chunk of the body to be discarded
* after its corresponding #SoupMessage::got_chunk signal is emitted.
- * (This is equivalent to setting the deprecated
- * %SOUP_MESSAGE_OVERWRITE_CHUNKS flag on the message.)
*
* If you set this flag to %FALSE on the #SoupMessage:response_body of
* a server-side message, it will cause each chunk of the body to be
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index da32b42f..8b7b7d80 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -1479,10 +1479,6 @@ soup_message_cleanup_response (SoupMessage *msg)
* @SOUP_MESSAGE_CAN_REBUILD: The caller will rebuild the request
* body if the message is restarted; see
* soup_message_body_set_accumulate() for more details.
- * @SOUP_MESSAGE_OVERWRITE_CHUNKS: Deprecated: equivalent to calling
- * soup_message_body_set_accumulate() on the incoming message body
- * (ie, #SoupMessage:response_body for a client-side request),
- * passing %FALSE.
* @SOUP_MESSAGE_CONTENT_DECODED: Set by #SoupContentDecoder to
* indicate that it has removed the Content-Encoding on a message (and
* so headers such as Content-Length may no longer accurately describe
@@ -1532,12 +1528,6 @@ soup_message_set_flags (SoupMessage *msg, SoupMessageFlags flags)
g_return_if_fail (SOUP_IS_MESSAGE (msg));
priv = soup_message_get_instance_private (msg);
- if ((priv->msg_flags ^ flags) & SOUP_MESSAGE_OVERWRITE_CHUNKS) {
- soup_message_body_set_accumulate (
- priv->server_side ? msg->request_body : msg->response_body,
- !(flags & SOUP_MESSAGE_OVERWRITE_CHUNKS));
- }
-
priv->msg_flags = flags;
g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_FLAGS);
}
diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h
index 42379a4b..8eb0f5c9 100644
--- a/libsoup/soup-message.h
+++ b/libsoup/soup-message.h
@@ -142,15 +142,12 @@ gboolean soup_message_get_is_top_level_navigation (SoupMessage *msg
typedef enum {
SOUP_MESSAGE_NO_REDIRECT = (1 << 1),
SOUP_MESSAGE_CAN_REBUILD = (1 << 2),
-#ifndef SOUP_DISABLE_DEPRECATED
- SOUP_MESSAGE_OVERWRITE_CHUNKS = (1 << 3),
-#endif
- SOUP_MESSAGE_CONTENT_DECODED = (1 << 4),
- SOUP_MESSAGE_CERTIFICATE_TRUSTED = (1 << 5),
- SOUP_MESSAGE_NEW_CONNECTION = (1 << 6),
- SOUP_MESSAGE_IDEMPOTENT = (1 << 7),
- SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS = (1 << 8),
- SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE = (1 << 9)
+ SOUP_MESSAGE_CONTENT_DECODED = (1 << 3),
+ SOUP_MESSAGE_CERTIFICATE_TRUSTED = (1 << 4),
+ SOUP_MESSAGE_NEW_CONNECTION = (1 << 5),
+ SOUP_MESSAGE_IDEMPOTENT = (1 << 6),
+ SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS = (1 << 7),
+ SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE = (1 << 8)
} SoupMessageFlags;
SOUP_AVAILABLE_IN_2_4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]