From 3ffd3acbcb38a44843d820d394569eb7a72f9ab3 Mon Sep 17 00:00:00 2001 From: reyk Date: Fri, 8 Aug 2008 20:34:30 +0000 Subject: [PATCH] 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. --- usr.sbin/relayd/relay.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) { -- 2.20.1