[vlc-commits] httpd: fix inverted logic

Rémi Denis-Courmont git at videolan.org
Sat Sep 5 09:07:54 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep  3 22:04:48 2020 +0300| [681e0664a794f07d728a0cfe53a47c18b9dff0af] | committer: Rémi Denis-Courmont

httpd: fix inverted logic

Don't always return "Client error" as error reason

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=681e0664a794f07d728a0cfe53a47c18b9dff0af
---

 src/network/httpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index e11c9aab99..6bf50f7d26 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -244,7 +244,7 @@ static const char *httpd_ReasonFromCode(unsigned i_code)
     assert((i_code >= 100) && (i_code <= 599));
 
     const http_status_info *p = http_reason;
-    while (i_code < p->i_code)
+    while (i_code > p->i_code)
         p++;
 
     if (p->i_code == i_code)



More information about the vlc-commits mailing list