summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2021-03-09 12:19:59 -0600
committerPatrick Griffis <pgriffis@igalia.com>2021-03-09 12:19:59 -0600
commit0a34d642a401c5880ec4f533250fdddc6dbb12b0 (patch)
tree4903370686406b3a0357c375056541062125d907
parentc61f62f9bae4a78f38266b41fc3af1a4acb2c929 (diff)
downloadlibsoup-0a34d642a401c5880ec4f533250fdddc6dbb12b0.tar.gz
Require body streams implement GPollableInputStream
-rw-r--r--libsoup/soup-message.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 73e7e003..0af1dd00 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -920,7 +920,7 @@ soup_message_new_from_multipart (const char *uri_string,
* soup_message_set_request_body:
* @msg: the message
* @content_type: (allow-none): MIME Content-Type of the body, or %NULL if unknown
- * @stream: (allow-none): a #GInputStream to read the request body from
+ * @stream: (allow-none): a #GPollableInputStream to read the request body from
* @content_length: the byte length of @stream or -1 if unknown
*
* Set the request body of a #SoupMessage.
@@ -928,6 +928,7 @@ soup_message_new_from_multipart (const char *uri_string,
* not be changed if present.
* The request body needs to be set again in case @msg is restarted
* (in case of redirection or authentication).
+ * @stream must implement #GPollableInputStream.
*/
void
soup_message_set_request_body (SoupMessage *msg,
@@ -936,7 +937,7 @@ soup_message_set_request_body (SoupMessage *msg,
gssize content_length)
{
g_return_if_fail (SOUP_IS_MESSAGE (msg));
- g_return_if_fail (stream == NULL || G_IS_INPUT_STREAM (stream));
+ g_return_if_fail (stream == NULL || G_IS_POLLABLE_INPUT_STREAM (stream));
g_return_if_fail (content_length == -1 || content_length >= 0);
SoupMessagePrivate *priv = soup_message_get_instance_private (msg);