Browse code

pv: test for HDR_ERROR_T after header name parsing

(cherry picked from commit c264fbc66a4690b073c72ffa8fc095227ce0ae8b)
(cherry picked from commit 18e85c98bb6eebf9afe83aaa0a832d1c4af46e62)

Daniel-Constantin Mierla authored on 03/06/2021 13:29:50
Showing 1 changed files
... ...
@@ -3248,8 +3248,8 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
3248 3248
 	s.s = p;
3249 3249
 	s.len = in->len+1;
3250 3250
 
3251
-	if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
3252
-	{
3251
+	parse_hname2_short(s.s, s.s + s.len, &hdr);
3252
+	if(hdr.type==HDR_ERROR_T) {
3253 3253
 		LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
3254 3254
 		goto error;
3255 3255
 	}