aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-18 17:39:06 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-18 17:39:06 +0400
commitdc0f570484ca1f7a44c0b5af0551056d00af58a1 (patch)
tree39ec5c4e5b13d0fc45c5a8c267e1123d518c19ca /src/protocol.c
parent30bad7395e5f45360b5716aeb5e7338f204cd36c (diff)
downloadrspamd-dc0f570484ca1f7a44c0b5af0551056d00af58a1.tar.gz
rspamd-dc0f570484ca1f7a44c0b5af0551056d00af58a1.zip
Fix http headers.
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/protocol.c b/src/protocol.c
index ebca96bc7..59d8fda13 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -392,6 +392,7 @@ static gboolean
parse_header (struct worker_task *task, f_str_t * line)
{
gchar *headern, *err, *tmp;
+ gboolean res = TRUE;
/* Check end of headers */
if (line->len == 0) {
@@ -462,7 +463,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'h':
@@ -474,7 +475,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'f':
@@ -486,7 +487,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'j':
@@ -497,7 +498,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'q':
@@ -509,7 +510,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'r':
@@ -527,7 +528,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'i':
@@ -543,7 +544,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
else {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
break;
case 'p':
@@ -556,7 +557,7 @@ parse_header (struct worker_task *task, f_str_t * line)
}
}
else {
- return FALSE;
+ res = FALSE;
}
break;
case 's':
@@ -568,7 +569,7 @@ parse_header (struct worker_task *task, f_str_t * line)
task->statfile = memory_pool_fstrdup (task->task_pool, line);
}
else {
- return FALSE;
+ res = FALSE;
}
break;
case 'u':
@@ -578,17 +579,17 @@ parse_header (struct worker_task *task, f_str_t * line)
task->user = memory_pool_fstrdup (task->task_pool, line);
}
else {
- return FALSE;
+ res = FALSE;
}
break;
default:
if (!task->is_http) {
msg_info ("wrong header: %s", headern);
- return FALSE;
+ res = FALSE;
}
}
- return TRUE;
+ return res;
}
gboolean