Browse code

core: aliased http_reply_hack to http_reply_parse

- a more relevant name for the core parameter that enables parsing http
replies

Daniel-Constantin Mierla authored on 23/09/2013 16:42:54
Showing 4 changed files
... ...
@@ -476,7 +476,7 @@ KILL_TIMEOUT	"exit_timeout"|"ser_kill_timeout"
476 476
 MAX_WLOOPS		"max_while_loops"
477 477
 PVBUFSIZE		"pv_buffer_size"
478 478
 PVBUFSLOTS		"pv_buffer_slots"
479
-HTTP_REPLY_HACK		"http_reply_hack"
479
+HTTP_REPLY_PARSE		"http_reply_hack"|"http_reply_parse"
480 480
 VERSION_TABLE_CFG		"version_table"
481 481
 
482 482
 SERVER_ID     "server_id"
... ...
@@ -910,8 +910,8 @@ IMPORTFILE      "import_file"
910 910
 									return PVBUFSIZE; }
911 911
 <INITIAL>{PVBUFSLOTS}			{	count(); yylval.strval=yytext;
912 912
 									return PVBUFSLOTS; }
913
-<INITIAL>{HTTP_REPLY_HACK}		{	count(); yylval.strval=yytext;
914
-									return HTTP_REPLY_HACK; }
913
+<INITIAL>{HTTP_REPLY_PARSE}		{	count(); yylval.strval=yytext;
914
+									return HTTP_REPLY_PARSE; }
915 915
 <INITIAL>{VERSION_TABLE_CFG}  { count(); yylval.strval=yytext; return VERSION_TABLE_CFG;}
916 916
 <INITIAL>{SERVER_ID}  { count(); yylval.strval=yytext; return SERVER_ID;}
917 917
 <INITIAL>{LATENCY_LOG}  { count(); yylval.strval=yytext; return LATENCY_LOG;}
... ...
@@ -531,7 +531,7 @@ extern char *finame;
531 531
 %token MAX_WLOOPS
532 532
 %token PVBUFSIZE
533 533
 %token PVBUFSLOTS
534
-%token HTTP_REPLY_HACK
534
+%token HTTP_REPLY_PARSE
535 535
 %token VERSION_TABLE_CFG
536 536
 %token CFG_DESCRIPTION
537 537
 %token SERVER_ID
... ...
@@ -1553,8 +1553,8 @@ assign_stm:
1553 1553
 	| PVBUFSIZE EQUAL error { yyerror("number expected"); }
1554 1554
 	| PVBUFSLOTS EQUAL NUMBER { pv_set_buffer_slots($3); }
1555 1555
 	| PVBUFSLOTS EQUAL error { yyerror("number expected"); }
1556
-	| HTTP_REPLY_HACK EQUAL NUMBER { http_reply_hack=$3; }
1557
-	| HTTP_REPLY_HACK EQUAL error { yyerror("boolean value expected"); }
1556
+	| HTTP_REPLY_PARSE EQUAL NUMBER { http_reply_parse=$3; }
1557
+	| HTTP_REPLY_PARSE EQUAL error { yyerror("boolean value expected"); }
1558 1558
     | SERVER_ID EQUAL NUMBER { server_id=$3; }
1559 1559
     | LATENCY_LOG EQUAL NUMBER { default_core_cfg.latency_log=$3; }
1560 1560
 	| LATENCY_LOG EQUAL error  { yyerror("number  expected"); }
... ...
@@ -206,7 +206,7 @@ extern int rt_timer2_prio;  /* "slow" timer */
206 206
 extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
207 207
 extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
208 208
 
209
-extern int http_reply_hack;
209
+extern int http_reply_parse;
210 210
 
211 211
 #ifdef USE_DNS_CACHE
212 212
 extern int dns_cache_init; /* if 0, the DNS cache is not initialized at startup */
... ...
@@ -45,7 +45,7 @@
45 45
 #include "../mem/mem.h"
46 46
 #include "../ut.h"
47 47
 
48
-int http_reply_hack = 0;
48
+int http_reply_parse = 0;
49 49
 
50 50
 /* grammar:
51 51
 	request  =  method SP uri SP version CRLF
... ...
@@ -98,7 +98,7 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start * fl)
98 98
 			fl->type=SIP_REPLY;
99 99
 			fl->u.reply.version.len=SIP_VERSION_LEN;
100 100
 			tmp=buffer+SIP_VERSION_LEN;
101
-	} else if (http_reply_hack != 0 && 
101
+	} else if (http_reply_parse != 0 &&
102 102
 		 	(*tmp=='H' || *tmp=='h') &&
103 103
 			/* 'HTTP/1.' */
104 104
 			strncasecmp( tmp+1, HTTP_VERSION+1, HTTP_VERSION_LEN-1)==0 &&