瀏覽代碼

modify strncasecmp function paramters

stanley-king 9 年之前
父節點
當前提交
e8c077510a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      helper/http_header.php

+ 2 - 2
helper/http_header.php

@@ -248,7 +248,7 @@ class http_header
             $colon_offset = strchr($header_line, ':');
             if($colon_offset)
             {
-                if (!strcasecmp($header_line, "Location",strlen("Location")))
+                if (!strncasecmp($header_line, "Location",strlen("Location")))
                 {
                     if( ($this->mStatusCode < 300 || $this->mStatusCode > 399) && $this->mStatusCode != 201)
                     {
@@ -262,7 +262,7 @@ class http_header
                         }
                     }
                 }
-                else if(!strcasecmp($header_line, "WWW-Authenticate",strlen("WWW-Authenticate"))) {
+                else if(!strncasecmp($header_line, "WWW-Authenticate",strlen("WWW-Authenticate"))) {
                     $this->mStatusCode = 401;
                 }
             }