Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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:
Has a Patch: no Platform: All

Description

Steps to Reproduce

  1. Boot hrev48639 of HaikuOS
  2. Launch Web Positive
  3. Type 'server.thursby.com:8080' into address bar and hit enter
  4. Notice that Web+ does a google search instead of recognizing it as a valid URL.

Attachments (1)

Screen Shot 2015-01-09 at 10.16.45 AM.png (196.7 KB) - added by codewrangler 5 years ago.
Screenshot of issue

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by codewrangler

Screenshot of issue

comment:1 Changed 5 years ago by pulkomandy

You can "force" it to work by adding a protocol: http://server.thursby.com:8080

comment:2 Changed 5 years ago by codewrangler

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.

Version 0, edited 5 years ago by codewrangler (next)

comment:3 Changed 5 years ago by leavengood

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:

https://code.google.com/p/chromium/codesearch#chromium/src/components/omnibox/autocomplete_input.cc&l=132

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.

comment:4 Changed 5 years ago by 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.

comment:5 in reply to:  4 Changed 5 years ago by codewrangler

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 Changed 5 years ago by pulkomandy

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.

comment:7 Changed 5 years ago by pulkomandy

Resolution: fixed
Status: newclosed

Fixed in hrev48674.

Last edited 5 years ago by pulkomandy (previous) (diff)
Note: See TracTickets for help on using tickets.