@@ -1650,7 +1650,7 @@ static int contains_name(const literal *lits, size_t llen, nghttp2_nv *nv)
16501650 for (i = 0 ; i < llen ; ++ i ) {
16511651 lit = & lits [i ];
16521652 if (lit -> len == nv -> namelen
1653- && !ap_cstr_casecmp (lit -> name , (const char * )nv -> name )) {
1653+ && !ap_cstr_casecmpn (lit -> name , (const char * )nv -> name , nv -> namelen )) {
16541654 return 1 ;
16551655 }
16561656 }
@@ -1705,7 +1705,7 @@ static apr_status_t req_add_header(apr_table_t *headers, apr_pool_t *pool,
17051705 return APR_SUCCESS ;
17061706 }
17071707 else if (nv -> namelen == sizeof ("cookie" )- 1
1708- && !ap_cstr_casecmp ("cookie" , (const char * )nv -> name )) {
1708+ && !ap_cstr_casecmpn ("cookie" , (const char * )nv -> name , nv -> namelen )) {
17091709 existing = apr_table_get (headers , "cookie" );
17101710 if (existing ) {
17111711 /* Cookie header come separately in HTTP/2, but need
@@ -1723,7 +1723,7 @@ static apr_status_t req_add_header(apr_table_t *headers, apr_pool_t *pool,
17231723 }
17241724 }
17251725 else if (nv -> namelen == sizeof ("host" )- 1
1726- && !ap_cstr_casecmp ("host" , (const char * )nv -> name )) {
1726+ && !ap_cstr_casecmpn ("host" , (const char * )nv -> name , nv -> namelen )) {
17271727 if (apr_table_get (headers , "Host" )) {
17281728 return APR_SUCCESS ; /* ignore duplicate */
17291729 }
0 commit comments