diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-02-22 23:07:39 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-02-22 23:07:39 +0000 |
commit | 0bec0c19674014c7eec0cfe7be984710e3e62ba5 (patch) | |
tree | 4744d8da2dbf4909bbe96626e3f5a10e2e266cc8 /usr.sbin/hoststated | |
parent | 2e075de6f9d2d1d5d8fcdadfe77531bab8f30ed3 (diff) |
read the exact length for POST requests as specified by the
content-length header.
Diffstat (limited to 'usr.sbin/hoststated')
-rw-r--r-- | usr.sbin/hoststated/relay.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/hoststated/relay.c b/usr.sbin/hoststated/relay.c index 5d9fbac12e2..d18aa07caa7 100644 --- a/usr.sbin/hoststated/relay.c +++ b/usr.sbin/hoststated/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 <reyk@openbsd.org> @@ -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); |