summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2007-10-28 17:23:38 +0000
committerDan Winship <danw@src.gnome.org>2007-10-28 17:23:38 +0000
commit2fcfaa9f21de3ddb4fab6c4e444f1437b249b55c (patch)
tree85cf9e2f33cab0af317a31332da8fe1a808f0698 /docs/reference
parentcb3563f19e8be5d0e898f5badc4bea4c5c9d7cd1 (diff)
downloadlibsoup-2fcfaa9f21de3ddb4fab6c4e444f1437b249b55c.tar.gz
libsoup-2fcfaa9f21de3ddb4fab6c4e444f1437b249b55c.tar.bz2
libsoup-2fcfaa9f21de3ddb4fab6c4e444f1437b249b55c.zip
ref the socket around the processing of the message, since otherwise it
* libsoup/soup-server.c (start_request, request_finished): ref the socket around the processing of the message, since otherwise it might already be freed when request_finished runs. #459896. * libsoup/soup-message-io.c (soup_message_io_pause) (soup_message_io_unpause): Clarify the docs here; this is for server-side use only. Inspired by #452280. * docs/reference/server-howto.xml: You need to watch the "finished" signal on the message if using soup_message_io_pause() or chunked encoding, because the client might disconnect while you're paused. Clarification inspired by #471385. * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since server-howto.xml points to it as an example of what to do. svn path=/trunk/; revision=947
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/server-howto.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/reference/server-howto.xml b/docs/reference/server-howto.xml
index 5ae4186e..2d7971b6 100644
--- a/docs/reference/server-howto.xml
+++ b/docs/reference/server-howto.xml
@@ -155,6 +155,10 @@ linkend="soup-message-io-pause"><function>soup_message_io_pause</function></link
on the message before returning from the callback. This will delay
sending a response until you call <link
linkend="soup-message-io-unpause"><function>soup_message_io_unpause</function></link>.
+(You must also connect to the <link
+linkend="SoupMessage-finished">finished</link> signal on the message
+in this case, so that you can break off processing if the client
+unexpectedly disconnects before you start sending the data.)
</para>
<para>
@@ -230,6 +234,15 @@ because I/O is automatically paused when doing a
</para>
<para>
+When using chunked encoding, you must also connect to the <link
+linkend="SoupMessage-finished">finished</link> signal on the message,
+so that you will be notified if the client disconnects between two
+chunks; <type>SoupServer</type> will unref the message if that
+happens, so you must stop adding new chunks to the response at that
+point.
+</para>
+
+<para>
The <emphasis role="bold"><literal>simple-proxy</literal></emphasis>
example in the <literal>tests/</literal> directory gives an example of
using <literal>chunked</literal> encoding.