-/* $OpenBSD: server_http.c,v 1.77 2015/04/09 16:48:29 florian Exp $ */
+/* $OpenBSD: server_http.c,v 1.78 2015/04/18 09:27:54 jsg Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
goto done;
}
- while (!clt->clt_done && (line = evbuffer_readline(src)) != NULL) {
+ while (!clt->clt_done && (line =
+ evbuffer_readln(src, NULL, EVBUFFER_EOL_CRLF_STRICT)) != NULL) {
linelen = strlen(line);
/*
}
switch (clt->clt_toread) {
case TOREAD_HTTP_CHUNK_LENGTH:
- line = evbuffer_readline(src);
+ line = evbuffer_readln(src, NULL, EVBUFFER_EOL_CRLF_STRICT);
if (line == NULL) {
/* Ignore empty line, continue */
bufferevent_enable(bev, EV_READ);
break;
case TOREAD_HTTP_CHUNK_TRAILER:
/* Last chunk is 0 bytes followed by trailer and empty line */
- line = evbuffer_readline(src);
+ line = evbuffer_readln(src, NULL, EVBUFFER_EOL_CRLF_STRICT);
if (line == NULL) {
/* Ignore empty line, continue */
bufferevent_enable(bev, EV_READ);
break;
case 0:
/* Chunk is terminated by an empty newline */
- line = evbuffer_readline(src);
+ line = evbuffer_readln(src, NULL, EVBUFFER_EOL_CRLF_STRICT);
if (line != NULL)
free(line);
if (server_bufferevent_print(clt, "\r\n") == -1)