[SR-Users] Valid URL characters in the RURI

Sam Ware sam.ware at gmail.com
Mon Jun 29 21:38:57 CEST 2020


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/35e7c8d3/attachment.html>


More information about the sr-users mailing list