aboutsummaryrefslogtreecommitdiff
path: root/liberty-proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'liberty-proto.c')
-rw-r--r--liberty-proto.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/liberty-proto.c b/liberty-proto.c
index fa6ab76..018523f 100644
--- a/liberty-proto.c
+++ b/liberty-proto.c
@@ -664,10 +664,11 @@ scgi_parser_push (struct scgi_parser *self,
if (digit == ':')
{
self->state = SCGI_READING_NAME;
+ str_remove_slice (&self->input, 0, 1);
break;
}
- if (digit < '0' || digit >= '9')
+ if (digit < '0' || digit > '9')
return error_set (e, "invalid header netstring");
size_t new_len = self->headers_len * 10 + (digit - '0');
@@ -700,6 +701,7 @@ scgi_parser_push (struct scgi_parser *self,
self->state = SCGI_READING_VALUE;
str_remove_slice (&self->input, 0, 1);
+ self->headers_len--;
break;
}
case SCGI_READING_VALUE:
@@ -728,6 +730,7 @@ scgi_parser_push (struct scgi_parser *self,
}
str_remove_slice (&self->input, 0, 1);
+ self->headers_len--;
break;
}
case SCGI_READING_CONTENT: