From 937f09733fdb4f68610763fc5c51fa6288ac8521 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ritschard Date: Fri, 24 Apr 2009 13:22:02 +0000 Subject: don't truncate http headers when no separator is given between key and value. ok & ``makes sense'' reyk@ --- usr.sbin/relayd/relay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 8117c8e21cf..73cd73aa762 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.109 2009/04/02 14:30:51 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.110 2009/04/24 13:22:01 pyr Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Reyk Floeter @@ -1366,7 +1366,7 @@ relay_read_http(struct bufferevent *bev, void *arg) } if (*pk.value == ':') { *pk.value++ = '\0'; - pk.value++; + pk.value += strspn(pk.value, " \t\r\n"); header = 1; } else { *pk.value++ = '\0'; -- cgit v1.2.3