[vlc-commits] httpd: fix inverted logic

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


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

httpd: fix inverted logic

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

(cherry picked from commit 681e0664a794f07d728a0cfe53a47c18b9dff0af)

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

 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 d3bc3d97aa..cc11a83065 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