pass length clearly
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 9e0a41e..c041383 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1204,10 +1204,10 @@
ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h,
ngx_uint_t offset)
{
- if (ngx_strcasestrn(h->value.data, "close", 4)) {
+ if (ngx_strcasestrn(h->value.data, "close", 5 - 1)) {
r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE;
- } else if (ngx_strcasestrn(h->value.data, "keep-alive", 9)) {
+ } else if (ngx_strcasestrn(h->value.data, "keep-alive", 10 - 1)) {
r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE;
}
@@ -1320,7 +1320,7 @@
if (r->headers_in.transfer_encoding
&& ngx_strcasestrn(r->headers_in.transfer_encoding->value.data,
- "chunked", 6))
+ "chunked", 7 - 1))
{
ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
"client sent \"Transfer-Encoding: chunked\" header");
@@ -1352,7 +1352,7 @@
user_agent = r->headers_in.user_agent->value.data;
- ua = ngx_strstrn(user_agent, "MSIE", 3);
+ ua = ngx_strstrn(user_agent, "MSIE", 4 - 1);
if (ua && ua + 8 < user_agent + r->headers_in.user_agent->value.len) {
@@ -1370,7 +1370,7 @@
#endif
}
- if (ngx_strstrn(user_agent, "Opera", 4)) {
+ if (ngx_strstrn(user_agent, "Opera", 5 - 1)) {
r->headers_in.opera = 1;
r->headers_in.msie = 0;
r->headers_in.msie4 = 0;
@@ -1378,10 +1378,10 @@
if (!r->headers_in.msie && !r->headers_in.opera) {
- if (ngx_strstrn(user_agent, "Gecko/", 5)) {
+ if (ngx_strstrn(user_agent, "Gecko/", 6 - 1)) {
r->headers_in.gecko = 1;
- } else if (ngx_strstrn(user_agent, "Konqueror", 8)) {
+ } else if (ngx_strstrn(user_agent, "Konqueror", 9 - 1)) {
r->headers_in.konqueror = 1;
}
}