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

HTTP:// in URL is case sensitive, won't accept http:// #5

Closed
ramarro123 opened this issue Oct 23, 2018 · 3 comments
Closed

HTTP:// in URL is case sensitive, won't accept http:// #5

ramarro123 opened this issue Oct 23, 2018 · 3 comments

Comments

@ramarro123
Copy link
Contributor

i am not 100% it's intended but, without documentation it's hard so i dig a bit on code and found

_URL->scheme = new char[8];
strcpy(_URL->scheme, "HTTP://");
if(url.startsWith("HTTP://")) {
   hostBeg += 7; 
}

my url was http:// and it doesn't work... converting it with uppercase make it work apparently.
doing a touppercase doesn't seems a good idea, cos parameters get uppercase as well.

@boblemaire
Copy link
Owner

That's something that's easily done without converting the whole String to uppercase:

if(url.substring(0,7).equalsIgnoreCase("HTTP://")){

Can you send a PR?

@ramarro123
Copy link
Contributor Author

probably done :) first PR so not sure if i did it correctly

@boblemaire boblemaire changed the title parseURL method not resilient enough HTTP:// in URL is case sensitive, won't accept http:// Oct 24, 2018
@boblemaire
Copy link
Owner

Fixed with PR#6

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

2 participants