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

fix broken urls #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

jayenashar
Copy link

No description provided.

@bdferris
Copy link
Member

bdferris commented May 1, 2013

Do you happen to know of an example agency id and route tag that was causing the URL parser to fail?

@jayenashar
Copy link
Author

sf-muni
K OWL

(there were a few with spaces)

@bdferris
Copy link
Member

bdferris commented May 1, 2013

In that case, I think the proper fix would be to actually construct a valid URL. For example, we can replace all the spaces in the route tag with "+" to make it a valid URL:

String url = "http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a="
+ _agencyId + "&r=" + routeTag.replace(' ', '+');

Note the addition of .replace(' ', '+') to the routeTag. This code would give you a URL like:

http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=sf-muni&r=K+OWL

Which does seem to work correctly. Any chance you'd be willing to make this change to your commit?

Also, any chance you could revert the changes to the imports at the top of the file? I'm assuming your IDE has a different import style than the existing code.

@jayenashar
Copy link
Author

The reason for using URI.toASCIIString() is to do the appropriate conversions for me. + when appropriate, %20 when appropriate.

My IDE is set to change the headers on the files it touches. It's probably easier for you to just close this request and make appropriate changes in your IDE as you see fit.

@jayenashar
Copy link
Author

just added a bunch more commits to this branch to fix various things.

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jayen Ashar seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

3 participants