Bug 58779

Summary: REGRESSION (r84010): [Qt] DRT: Unbreak redirection of http:/ URLs.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Tools / TestsAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, ossy, webkit.review.bot, yael
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch none

Description Andreas Kling 2011-04-18 06:19:17 PDT
r84010 broke redirection of [broken] http:/ URLs because KURL cannot extract the host part of such URLs.
Comment 1 Andreas Kling 2011-04-18 06:36:11 PDT
Created attachment 90026 [details]
Proposed patch
Comment 2 Eric Seidel (no email) 2011-04-18 09:11:26 PDT
Comment on attachment 90026 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=90026&action=review

> Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1029
> +    QUrl url = newRequest.url();

Why use a QUrl instead of a KURL?
Comment 3 Andreas Kling 2011-04-18 09:18:01 PDT
(In reply to comment #2)
> (From update of attachment 90026 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=90026&action=review
> 
> > Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1029
> > +    QUrl url = newRequest.url();
> 
> Why use a QUrl instead of a KURL?

See ChangeLog:

"KURL::host() doesn't return the host part of [broken] http:/ URLs, so use QUrl instead to match the behavior of other ports."

I could also fix the test to use http:// instead of http:/ but it seemed more appropriate to have consistent behavior across ports.
Comment 4 Adam Barth 2011-04-18 11:42:59 PDT
Comment on attachment 90026 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=90026&action=review

>>> Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1029
>>> -    KURL url = newRequest.url();
>>> +    QUrl url = newRequest.url();
>> 
>> Why use a QUrl instead of a KURL?
> 
> See ChangeLog:
> 
> "KURL::host() doesn't return the host part of [broken] http:/ URLs, so use QUrl instead to match the behavior of other ports."
> 
> I could also fix the test to use http:// instead of http:/ but it seemed more appropriate to have consistent behavior across ports.

How do other port solve this problem with KURL?
Comment 5 Andreas Kling 2011-04-18 11:47:31 PDT
(In reply to comment #4)
> (From update of attachment 90026 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=90026&action=review
> 
> >>> Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1029
> >>> -    KURL url = newRequest.url();
> >>> +    QUrl url = newRequest.url();
> >> 
> >> Why use a QUrl instead of a KURL?
> > 
> > See ChangeLog:
> > 
> > "KURL::host() doesn't return the host part of [broken] http:/ URLs, so use QUrl instead to match the behavior of other ports."
> > 
> > I could also fix the test to use http:// instead of http:/ but it seemed more appropriate to have consistent behavior across ports.
> 
> How do other port solve this problem with KURL?

Apple is using NSURL, Chromium GURL and Gtk is using SoupURI. In other words, everyone is using their platform URL class.
Comment 6 Adam Barth 2011-04-18 11:54:29 PDT
Comment on attachment 90026 [details]
Proposed patch

I think a better solution would be to fix KURL, but this is probably ok for now.
Comment 7 WebKit Commit Bot 2011-04-18 12:23:41 PDT
Comment on attachment 90026 [details]
Proposed patch

Clearing flags on attachment: 90026

Committed r84168: <http://trac.webkit.org/changeset/84168>
Comment 8 WebKit Commit Bot 2011-04-18 12:23:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 WebKit Review Bot 2011-04-18 13:26:19 PDT
http://trac.webkit.org/changeset/84168 might have broken Qt Linux Release
The following tests are not passing:
fast/ruby/after-block-doesnt-crash.html
fast/ruby/after-table-doesnt-crash.html
fast/ruby/before-block-doesnt-crash.html
fast/ruby/before-table-doesnt-crash.html