Index: res/res_config_curl.c =================================================================== --- res/res_config_curl.c (revision 101014) +++ res/res_config_curl.c (working copy) @@ -95,7 +95,10 @@ *stringp = '\0'; stringp = buffer; - while ((pair = strsep(&stringp, "&"))) { + /* Remove leading spaces */ + while (*stringp <= ' ') + stringp++; + while (strchr(stringp, '=') && (pair = strsep(&stringp, "&"))) { key = strsep(&pair, "="); ast_uri_decode(key); if (pair) @@ -172,7 +175,10 @@ /* Line oriented output */ stringp = buffer; - while ((line = strsep(&stringp, "\r\n"))) { + /* Remove leading spaces */ + while (*stringp <= ' ') + stringp++; + while (strchr(stringp, '=') && (line = strsep(&stringp, "\r\n"))) { if (ast_strlen_zero(line)) continue;