Browse code

- fixed a header parsing bug found by Bogdan ( thing like "c:" generated a header error instead of being ignored)

Andrei Pelinescu-Onciul authored on 18/01/2002 16:04:10
Showing 1 changed files
... ...
@@ -480,12 +480,14 @@ char* parse_hname(char* p, char* end, struct hdr_field* hdr)
480 480
 								hdr->type=HDR_OTHER;
481 481
 								goto skip;
482 482
 							default:
483
-								/*printf("found unkown header, state=%d\n", 
484
-											state);*/
485
-								LOG(L_ERR, "ERROR : bug?: parse_hname:"
486
-										" on char <%c> state %d\n",
487
-										*t, state);
488
-								goto error;
483
+								/* unknown header, e.g: "c:"*/
484
+								*t=0;
485
+								DBG("unknown header found, prev. state=%d\n",
486
+										state);
487
+								state=UNKNOWN_HEADER;
488
+								hdr->name.len=t-hdr->name.s;
489
+								hdr->type=HDR_OTHER;
490
+								goto skip;
489 491
 						}
490 492
 						break;
491 493