diff --git a/ffserver.c b/ffserver.c
index 9a53e4950ed5cf357e107886e10ba1845b7e101c..35634683380c7cf500be659198997d0a06b750e7 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2442,7 +2442,7 @@ static int http_start_receive_data(HTTPContext *c)
     c->buffer_ptr = c->buffer;
     c->buffer_end = c->buffer + FFM_PACKET_SIZE;
     c->stream->feed_opened = 1;
-    c->chunked_encoding = !!strcasestr(c->buffer, "Transfer-Encoding: chunked");
+    c->chunked_encoding = !!av_stristr(c->buffer, "Transfer-Encoding: chunked");
     return 0;
 }