summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 44693ef32..7f22b96c8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8449,8 +8449,6 @@ static const char *__get_header(const struct sip_request *req, const char *name,
* one afterwards. If you shouldn't do it, what absolute idiot decided it was
* a good idea to say you can do it, and if you can do it, why in the hell would.
* you say you shouldn't.
- * Anyways, pedanticsipchecking controls whether we allow spaces before ':',
- * and we always allow spaces after that for compatibility.
*/
const char *sname = find_alias(name, NULL);
int x, len = strlen(name), slen = (sname ? 1 : 0);
@@ -8463,10 +8461,10 @@ static const char *__get_header(const struct sip_request *req, const char *name,
if (match || smatch) {
/* skip name */
const char *r = header + (match ? len : slen );
- if (sip_cfg.pedanticsipchecking) {
- r = ast_skip_blanks(r);
+ /* HCOLON has optional SP/HTAB; skip past those */
+ while (*r == ' ' || *r == '\t') {
+ ++r;
}
-
if (*r == ':') {
*start = x+1;
return ast_skip_blanks(r+1);