add missing 'break' to read HTTP content correctly
authorreyk <reyk@openbsd.org>
Mon, 11 Aug 2008 06:42:06 +0000 (06:42 +0000)
committerreyk <reyk@openbsd.org>
Mon, 11 Aug 2008 06:42:06 +0000 (06:42 +0000)
usr.sbin/relayd/relay.c

index 9f1d527..fb83a7c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: relay.c,v 1.101 2008/08/08 22:49:33 reyk Exp $        */
+/*     $OpenBSD: relay.c,v 1.102 2008/08/11 06:42:06 reyk Exp $        */
 
 /*
  * Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -1504,8 +1504,10 @@ relay_read_http(struct bufferevent *bev, void *arg)
                case HTTP_METHOD_PUT:
                case HTTP_METHOD_RESPONSE:
                        /* HTTP request payload */
-                       if (cre->toread)
+                       if (cre->toread) {
                                bev->readcb = relay_read_httpcontent;
+                               break;
+                       }
 
                        /* Single-pass HTTP response */
                        bev->readcb = relay_read;