rtp2httpd icon indicating copy to clipboard operation
rtp2httpd copied to clipboard

Strip trailing slash

Open jangregor opened this issue 1 year ago • 0 comments

If the URL ends in / the UDPXY-like processing does not work. A solution would be to strip trailing / like this:

        if (url[strlen(url)-1] == '/') {
                logger(LOG_DEBUG, "Stripping trailing /: %s\n", url);
                url[strlen(url)-1] = '\0';
        }

A good place would be to put this in src/httpclients.c right above: urlfrom = rindex(url, '/');

jangregor avatar Jul 06 '24 19:07 jangregor