From 0bec0c19674014c7eec0cfe7be984710e3e62ba5 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Thu, 22 Feb 2007 23:07:39 +0000 Subject: read the exact length for POST requests as specified by the content-length header. --- usr.sbin/relayd/relay.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'usr.sbin/relayd') diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 5d9fbac12e2..d18aa07caa7 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.1 2007/02/22 03:32:40 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.2 2007/02/22 23:07:38 reyk Exp $ */ /* * Copyright (c) 2006 Reyk Floeter @@ -930,16 +930,11 @@ relay_read_http(struct bufferevent *bev, void *arg) /* * Need to read data from the client after the * HTTP header. - */ - cre->toread = strtonum(pk.value, 1, INT_MAX, &errstr); - - /* - * \r\n between header and body. * XXX What about non-standard clients not using * the carriage return? And some browsers seem to * include the line length in the content-length. */ - cre->toread += 2; + cre->toread = strtonum(pk.value, 1, INT_MAX, &errstr); if (errstr) { relay_close(con, errstr); -- cgit v1.2.3