summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2011-07-11 13:26:13 +0200
committerJens Georg <mail@jensge.org>2011-07-11 21:11:57 +0200
commit7a7afa43a3b17d899e3937634239d0b38bdc1374 (patch)
treeb1c43425e27c81530af2cd0496d6bd8252e4d0fe
parentd527bf0cf2964b53b4aa60d9934e378628569043 (diff)
downloadrygel-7a7afa43a3b17d899e3937634239d0b38bdc1374.tar.gz
core: Fix insane memory leak in HTTPPost
- Don't accumulate message chunks in Soup.Message - Don't use vala async support to write buffers. This can delay release of chunks that much that OOM is hit Conflicts: src/rygel/rygel-http-post.vala
-rw-r--r--src/rygel/rygel-http-post.vala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/rygel/rygel-http-post.vala b/src/rygel/rygel-http-post.vala
index 4ec1b591..364e971f 100644
--- a/src/rygel/rygel-http-post.vala
+++ b/src/rygel/rygel-http-post.vala
@@ -38,6 +38,7 @@ internal class Rygel.HTTPPost : HTTPRequest {
Soup.Server server,
Soup.Message msg) {
base (http_server, server, msg);
+ msg.request_body.set_accumulate (false);
}
protected override async void handle () throws Error {
@@ -115,10 +116,6 @@ internal class Rygel.HTTPPost : HTTPRequest {
}
private void on_got_chunk (Message msg, Buffer chunk) {
- this.write_chunk.begin (chunk);
- }
-
- private async void write_chunk (Buffer chunk) {
try {
this.stream.write (chunk.data, this.cancellable);
} catch (Error error) {