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
Inconsistent case handling for non lowercase system_ids #427
Comments
That's surprising. I can't recall having made a conscious decision to lowercase URLs and I can't find any code path that does it. |
@hbruch Are you able to work on this? |
This issue can be worked around using lowercase system IDs. I'll look into this after another issue we see currently. |
Seems like FeedUrlUtil#L36 is the culprit lowercasing the system_id. Looking into the commit history, it seems as it has been like this for a long time already. I suppose, that usually only lowercase system_ids have been used. Would you nevertheless support removing the lowercasing? If yes, I'd prepare a PR. |
Is it URI.create()? I'm pretty sure String.format with %s preserves the case. That aside, yes lowercasing was never my intention, feel free to open a PR for this :) |
I'd just remove the |
Wow, I can't believe I missed that 🗡️ . Well, I guess I must have put it there, but I can't think of any reason why it should be so. So I vote to remove it. |
Oh wait, the lowercasing is there for the feed names! |
That must be a remnant of the past, the enum values are already lowercased. Remove it :) |
Expected behavior
Either lamassu should enforce lowercase system_ids in feedproviders.yml, or it should not lowercase the system_id when publishing feed urls.
Observed behavior
We configured a provider using it's original mixed case system_id (e.g. provider_TOWN).
Lamassu publishes this feed in http://lamassu:8080/gbfs as http://lamassu:8080/gbfs/provider_town/gbfs, which results in a 404 error when requested. http://lamassu:8080/gbfs/provider_TOWN/gbfs works.
Version of lamassu used (exact commit hash or JAR name)
8cff0c8
Data sets in use (links to GBFS feeds)
any
Steps to reproduce the problem
Configure e.g.
http://localhost:8080/gbfs will respond with:
The text was updated successfully, but these errors were encountered: