Open jayenashar opened 11 years ago
sf-muni K OWL
(there were a few with spaces)
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="
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.
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.
just added a bunch more commits to this branch to fix various things.
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.
Do you happen to know of an example agency id and route tag that was causing the URL parser to fail?