Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip trailing slash #9

Open
jangregor opened this issue Jul 6, 2024 · 0 comments
Open

Strip trailing slash #9

jangregor opened this issue Jul 6, 2024 · 0 comments

Comments

@jangregor
Copy link

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, '/');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant