I'm using Sanity Checks. Is an underscore (_) not allowed in the host portion of the RURI?
I'm on version 5.3. I reviewed the pase_uri function in the core parse_uri.c but I am not super proficient in C.
case URI_HOST_P: switch(*p) { check_host_end; default: if(!isalnum(*p) && (*p != '.') && (*p != '-') && !uri_host_char_allowed(*p)) { goto error_bad_host; } } break;
I see it calls out periods (.) and dashes (-) but not underscores. I'm wondering why, being underscores are allowed in URLs.
Hello,
you can enable it: https://www.kamailio.org/wiki/cookbooks/devel/core#uri_host_extra_chars
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Sam Ware Sent: Monday, June 29, 2020 9:39 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Valid URL characters in the RURI
I'm using Sanity Checks. Is an underscore (_) not allowed in the host portion of the RURI? I'm on version 5.3. I reviewed the pase_uri function in the core parse_uri.c but I am not super proficient in C. case URI_HOST_P: switch(*p) { check_host_end; default: if(!isalnum(*p) && (*p != '.') && (*p != '-') && !uri_host_char_allowed(*p)) { goto error_bad_host; } } break;
I see it calls out periods (.) and dashes (-) but not underscores. I'm wondering why, being underscores are allowed in URLs.
-- Sam D Ware