chesterpolo / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

should_keep_alive() should use mg_strcasecmp #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found my connections would not stay open - most clients send

Connection: Keep-Alive

fix, tested:

--- a/mongoose.c        Mon Sep 27 01:06:05 2010 +0100
+++ b/mongoose.c        Mon Oct 04 19:42:17 2010 +0100
@@ -731,7 +731,7 @@
   const char *http_version = conn->request_info.http_version;
   const char *header = mg_get_header(conn, "Connection");
   return (header == NULL && http_version && !strcmp(http_version, "1.1")) ||
-      (header != NULL && !strcmp(header, "keep-alive"));
+      (header != NULL && !mg_strcasecmp(header, "keep-alive"));
 }

 static const char *suggest_connection_header(const struct mg_connection *conn) {

Original issue reported on code.google.com by peter.m.galbavy@gmail.com on 4 Oct 2010 at 6:44

GoogleCodeExporter commented 9 years ago
Submitted 
http://code.google.com/p/mongoose/source/detail?r=431fc39df59d2d5365c41e38dd0e0e
347a186bb3, thank you.

Original comment by valenok on 5 Oct 2010 at 6:09