[SR-Users] Valid URL characters in the RURI

Henning Westerholt hw at skalatan.de
Mon Jun 29 21:57:25 CEST 2020


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.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Sam Ware
Sent: Monday, June 29, 2020 9:39 PM
To: Kamailio (SER) - Users Mailing List <sr-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200629/beab2c09/attachment.html>


More information about the sr-users mailing list