diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-20 16:39:39 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-20 16:39:39 +0000 |
commit | 3120e6e452d23226fe3ae1eb945e6fcb4ab37c2e (patch) | |
tree | 05911c224785f504a7278271b868f5e070c5dcd8 /main/http.c | |
parent | 60c5b78a7e8bff2e4153385d65d4e161e2a62da3 (diff) |
Reverse the check for Cookie: and remove leftover code implementing
the same thing.
Add an ast_debug() call to help debugging the url matching.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117266 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/http.c')
-rw-r--r-- | main/http.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/main/http.c b/main/http.c index 42d0db5fd..7dc46a3bc 100644 --- a/main/http.c +++ b/main/http.c @@ -451,6 +451,7 @@ static struct ast_str *handle_uri(struct ast_tcptls_session_instance *ser, char /* scan registered uris to see if we match one. */ AST_RWLIST_RDLOCK(&uris); AST_RWLIST_TRAVERSE(&uris, urih, entry) { + ast_debug(2, "match request [%s] with handler [%s] len %d\n", uri, urih->uri, l); if (!saw_method) { switch (method) { case AST_HTTP_GET: @@ -632,33 +633,9 @@ static void *httpd_helper_thread(void *data) if (ast_strlen_zero(cookie)) { break; } - if (strncasecmp(cookie, "Cookie: ", 8)) { - char *name, *value; - struct ast_variable *var; - - value = ast_strdupa(cookie); - name = strsep(&value, ":"); - if (!value) { - continue; - } - value = ast_skip_blanks(value); - if (ast_strlen_zero(value)) { - continue; - } - var = ast_variable_new(name, value, ""); - if (!var) { - continue; - } - var->next = headers; - headers = var; - - continue; - } - - if (vars) { - ast_variables_destroy(vars); + if (!strncasecmp(cookie, "Cookie: ", 8)) { + vars = parse_cookies(cookie); } - vars = parse_cookies(cookie); } if (!*uri) { |