-
Notifications
You must be signed in to change notification settings - Fork 53
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
bad url join in celery task when site_url has a path components #20
Comments
You're quite right. How about changing it to:
Perhaps you could create some pull requests with this or similar change? |
Yes I could. However, I'm not sure what the proper way to fix this. Sure your suggestion would work, but since this appears to be broken in other extensions as well, I was looking for a standard way to handle this... And looking into ckan source code, I could find a few different "solutions":
Did I miss something or should we really go and fix all usages of urljoin the way you suggests? |
site_url shouldn't have path components, that's what root_path is for. The url_for helper can be used to generate full paths correctly, I think. |
QOL-8059 Add GitHub actions workflow
Consider
ckan.site_url = http://somehost/ckan
in CKAN configuration file. With this, when buildingapi_url
here, one gets the wrong URLhttp://somehost/api/action
because the "ckan" path component gets dropped by urljoin. One solution would be to have a trailing/
in site_url configuration option but this is apparently not recommended. So I guess some url manipulation would be needed on extension side.Note that other extensions (such as archiver and datastorer) have the same problem.
The text was updated successfully, but these errors were encountered: