diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2015-11-23 11:04:31 -0500 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2015-11-23 14:22:45 -0500 |
commit | df75fc232a3d9191be6e2393400a2eff9602f43a (patch) | |
tree | a96355873429fcbb85e145885985ad3d030b92d0 /src/ostree/ot-builtin-trivial-httpd.c | |
parent | 5307af5a7adc79af331c6da804c0ea75cb6adf22 (diff) | |
download | ostree-df75fc232a3d9191be6e2393400a2eff9602f43a.tar.gz |
repo: Never delete .commitmeta files
Do not delete a .commitmeta file after removing the last metadata entry.
This way a client will pull the empty .commitmeta file and overwrite old
metadata as expected.
https://bugzilla.gnome.org/750459
Diffstat (limited to 'src/ostree/ot-builtin-trivial-httpd.c')
-rw-r--r-- | src/ostree/ot-builtin-trivial-httpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c index d7701893..c6a3757d 100644 --- a/src/ostree/ot-builtin-trivial-httpd.c +++ b/src/ostree/ot-builtin-trivial-httpd.c @@ -273,7 +273,8 @@ do_get (OtTrivialHttpd *self, buffer = soup_buffer_new_with_owner (g_mapped_file_get_contents (mapping), buffer_length, mapping, (GDestroyNotify)g_mapped_file_unref); - soup_message_body_append_buffer (msg->response_body, buffer); + if (buffer->length > 0) + soup_message_body_append_buffer (msg->response_body, buffer); soup_buffer_free (buffer); } else /* msg->method == SOUP_METHOD_HEAD */ |