diff --git a/mongoose.c b/mongoose.c index 7c67569e..6663b926 100644 --- a/mongoose.c +++ b/mongoose.c @@ -791,6 +791,13 @@ static int is_error(int n) { return n == 0 || (n < 0 && errno != EINTR && errno != EAGAIN); } +static void discard_leading_iobuf_bytes(struct iobuf *io, int n) { + if (n >= 0 && n <= io->len) { + memmove(io->buf, io->buf + n, io->len - n); + io->len -= n; + } +} + #ifndef NO_CGI #ifdef _WIN32 struct threadparam { @@ -1184,13 +1191,6 @@ static void read_from_cgi(struct connection *conn) { } } -static void discard_leading_iobuf_bytes(struct iobuf *io, int n) { - if (n >= 0 && n <= io->len) { - memmove(io->buf, io->buf + n, io->len - n); - io->len -= n; - } -} - static void forward_post_data(struct connection *conn) { struct iobuf *io = &conn->local_iobuf; int n = send(conn->endpoint.cgi_sock, io->buf, io->len, 0);