fix segfault
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index ed280a8..e0aefed 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2613,6 +2613,10 @@
 
         while (*++p == ' ') { /* void */ }
 
+        if (*p == '\0') {
+            return NGX_OK;
+        }
+
         if (ngx_strncasecmp(p, (u_char *) "charset=", 8) != 0) {
             continue;
         }