Add SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies upstream_master
authorDan Winship <danw@gnome.org>
Thu, 11 Aug 2011 01:50:54 +0000 (21:50 -0400)
committerDan Winship <danw@gnome.org>
Tue, 16 Aug 2011 14:02:54 +0000 (10:02 -0400)
commitf8e049184dd09117b9f545b4e51cba7785330f72
tree4f65ca2b24eabcd2e956774d622dc868f1ff497f
parent7dffafbfbbb4bafa7fcaa36c53f71e0034d85406
Add SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies

Long ago, soup_message_body_set_accumulate() was made into a no-op on
request bodies, because otherwise there would be no body available to
send if the request was restarted. Add a SOUP_MESSAGE_CAN_REBUILD
flag, that indicates that the caller takes responsibility for handling
this, and properly discard chunks if that is set.

Also update chunk-test to test this, and (finally!) remove the FIXME
there, since we are now testing the !accumulate codepath again
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=656650
libsoup/soup-message-body.c
libsoup/soup-message-io.c
libsoup/soup-message.c
libsoup/soup-message.h
tests/chunk-test.c