From: reyk Date: Fri, 8 Aug 2008 20:34:30 +0000 (+0000) Subject: chunked encoding may include empty lines at random places, do not X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3ffd3acbcb38a44843d820d394569eb7a72f9ab3;p=openbsd chunked encoding may include empty lines at random places, do not abort the session if we get an empty line except of the expected chunk header. --- diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 8f47023f508..8c02fbfd568 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.99 2008/08/08 19:13:24 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.100 2008/08/08 20:34:30 reyk Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Reyk Floeter @@ -1188,7 +1188,8 @@ relay_read_httpchunks(struct bufferevent *bev, void *arg) if (!cre->toread) { line = evbuffer_readline(src); if (line == NULL) { - relay_close(con, "invalid chunk"); + /* Ignore empty line, continue */ + bufferevent_enable(bev, EV_READ); return; } if (!strlen(line)) {