Browse Source

When URI is enclosed between <>, the trailing spaces are ignored.
Thanks to Jan!

Bogdan-Andrei Iancu 23 years ago
parent
commit
55dd7213ac
1 changed files with 3 additions and 1 deletions
  1. 3 1
      parser/parse_to.c

+ 3 - 1
parser/parse_to.c

@@ -498,6 +498,8 @@ char* parse_to(char* buffer, char *end, struct to_body *to_b)
 
 	status=START_TO;
 	to_b->error=PARSE_OK;
+	to_b->uri.len = 0;
+	to_b->uri.s= 0;
 	foo=0;
 
 	for( tmp=buffer; tmp<end; tmp++)
@@ -643,8 +645,8 @@ char* parse_to(char* buffer, char *end, struct to_body *to_b)
 					case DISPLAY_QUOTED:
 						break;
 					case URI_ENCLOSED:
-					case E_URI_ENCLOSED:
 						to_b->uri.len = tmp - to_b->uri.s;
+					case E_URI_ENCLOSED:
 						status = END;
 						foo = 0;
 						break;