Browse Source

Fix remaining padding decrement

master v0.1.3
Stefan Bühler 12 years ago
parent
commit
75eb03e210
  1. 2
      fastcgi.c

2
fastcgi.c

@ -346,8 +346,8 @@ static GByteArray *read_content(fastcgi_connection *fcon) {
buf = read_chunk(fcon, fcon->content_remaining + fcon->padding_remaining);
if (!buf) return NULL;
if (buf->len > fcon->content_remaining) {
g_byte_array_set_size(buf, fcon->content_remaining);
fcon->padding_remaining -= (buf->len - fcon->content_remaining);
g_byte_array_set_size(buf, fcon->content_remaining);
fcon->content_remaining = 0;
} else {
fcon->content_remaining -= buf->len;

Loading…
Cancel
Save