#11726 closed bug (fixed)
Adding PORT to domain name causes WebPositive to do a Google search instead of load the web page
Reported by: | codewrangler | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/WebPositive | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Steps to Reproduce
- Boot hrev48639 of HaikuOS
- Launch Web Positive
- Type 'server.thursby.com:8080' into address bar and hit enter
- Notice that Web+ does a google search instead of recognizing it as a valid URL.
Attachments (1)
Change History (8)
by , 10 years ago
Attachment: | Screen Shot 2015-01-09 at 10.16.45 AM.png added |
---|
comment:1 by , 10 years ago
You can "force" it to work by adding a protocol: http://server.thursby.com:8080
comment:2 by , 10 years ago
Yes, you can force it...However, you shouldn't have to. Web+ should have better logic to match the behavior of popular browsers like Safari, Chrome, Firefox and IE.
For example.... 'domain.com:8080' is a valid URL. As it's being typed into a 'browser' address bar, if it can't determine the protocol and it looks like a URL, it should try 'http://', since that's MOST likely what the user meant, since it's a Web browser.
comment:3 by , 10 years ago
The code I originally wrote for this was very stupid, though it seems to have been improved a lot in subsequent years:
http://cgit.haiku-os.org/haiku/tree/src/apps/webpositive/BrowserWindow.cpp#n2465
We probably just need to create a new class to handle this and mimic Chrome's logic:
The above is pretty complicated (and maybe more complicated than we need), but it is well commented.
Having some unit tests around it would be good probably.
This would be a great little piece of code for someone to contribute!
I would enjoy doing it but don't have the time.
follow-up: 5 comment:4 by , 10 years ago
Though having said all that, this particular specific bug of having a port number is probably easy enough to fix without going too crazy.
comment:5 by , 10 years ago
Replying to leavengood:
Though having said all that, this particular specific bug of having a port number is probably easy enough to fix without going too crazy.
I would agree...
comment:6 by , 10 years ago
I mentionned the workaround only so you can access your website until this get fixed. Of course we need a proper fix.
The BUrl class has some rather good URL parsing now (and it has a test suite). Maybe we could make more use of it.
Screenshot of issue