GNOME Bugzilla – Bug 737771
souphttpclientsink: Stream header buffer lifetime assumptions are incorrect
Last modified: 2014-10-14 07:44:09 UTC
Stream headers are updated whenever ::set_caps is called, so we can't assume they'll be valid till the message body is written out. We *can* assume that for queued buffers, but SOUP_MEMORY_STATIC is still wrong for those. This false assumption often leads to corrupted stream headers being sent out if a pipeline containing souphttpclientsink is restarted. The attached patch fixes this.
Created attachment 287566 [details] [review] Fix lifetime of stream headers
commit f35f3ccf7c9d659c070a636dbf62ce7d4127053b Author: Nirbheek Chauhan <nirbheek@centricular.com> Date: Thu Oct 2 14:26:08 2014 +0530 souphttpclientsink: Fix lifetime of stream headers and queued buffers Stream headers are updated whenever ::set_caps is called, so we can't assume they'll be valid before the message body is written out. We *can* assume that for queued buffers, but SOUP_MEMORY_STATIC is still wrong for those. Also, add some debug logging for stream header interactions. https://bugzilla.gnome.org/show_bug.cgi?id=737771