<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>23508</bug_id>
          
          <creation_ts>2009-01-23 12:47:02 -0800</creation_ts>
          <short_desc>Returns Blank Page for all &quot;about&quot; protocols</short_desc>
          <delta_ts>2009-02-02 13:50:00 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Genevieve Mak">gen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>manyoso</cc>
    
    <cc>staikos</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106787</commentid>
    <comment_count>0</comment_count>
    <who name="Genevieve Mak">gen</who>
    <bug_when>2009-01-23 12:47:02 -0800</bug_when>
    <thetext>loader/MainResourceLoader.cpp:
The function shouldLoadAsEmptyDocument() returns true for all &quot;about&quot; prefixed pages (eg &quot;about:config&quot;) pages which blocks the implementation of the about protocol. Only &quot;about:blank&quot; should return true for a blank page.

I&apos;ve included a patch and a log file.
2009-01-23  Genevieve Mak  &lt;gen@staikos.net&gt;

        Reviewed by NOBODY (OOPS!).

        Fix shouldLoadAsEmptyDocument() to return a blank page for an empty
        url or about:blamk

        * loader/MainResourceLoader.cpp:

diff --git a/WebCore/loader/MainResourceLoader.cpp b/WebCore/loader/MainResourceLoader.cpp
index 325809b..57c9426 100644
--- a/WebCore/loader/MainResourceLoader.cpp
+++ b/WebCore/loader/MainResourceLoader.cpp
@@ -186,7 +186,7 @@ void MainResourceLoader::willSendRequest(ResourceRequest&amp; newRequest, const Reso

 static bool shouldLoadAsEmptyDocument(const KURL&amp; url)
 {
-    return url.isEmpty() || equalIgnoringCase(String(url.protocol()), &quot;about&quot;);
+    return url.isEmpty() || (equalIgnoringCase(url.protocol(), &quot;about&quot;) &amp;&amp; equalIgnoringCase(url.path().stripWhiteSpace(), &quot;blank&quot;));
 }

 void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy, const ResourceResponse&amp; r)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106788</commentid>
    <comment_count>1</comment_count>
      <attachid>26980</attachid>
    <who name="Genevieve Mak">gen</who>
    <bug_when>2009-01-23 12:51:10 -0800</bug_when>
    <thetext>Created attachment 26980
Patch and logfile

Proposed patch to return a blank page for only &quot;about:blank&quot; urls and empty urls instead of all &quot;about:*&quot; urls.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106838</commentid>
    <comment_count>2</comment_count>
      <attachid>26980</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-01-23 18:18:21 -0800</bug_when>
    <thetext>Comment on attachment 26980
Patch and logfile

Looks good.

1) The check for &quot;about&quot; should be using the protocolIs function, which is more efficient than calling .protocol() and then calling equalIgnoringCase. You&apos;re not changing that aspect of the function, but I&apos;m surprised to see any code still doing it this old-fashioned way.

2) To limit this to &quot;about:blank&quot;, then I think the normal idiom would be &quot;equalIgnoringRef(url, blankURL())&quot;. This would be more efficient than the code you wrote. Your code would also allow strings like &quot;about: blank &quot; and &quot;about:blank?notsoblank&quot;; maybe that additional behavior is good, maybe bad. You

3) SecurityOrigin.cpp assumes that the &quot;about&quot; protocol has certain security properties. If you implement something that makes some about URLs return something other than an empty page, you could create security problems. I don&apos;t know anything more than that.

4) Safari and other Mac OS X applications may well rely on all &quot;about:&quot; URLs giving you a blank document, not just &quot;about:blank&quot;, so I think this change may not be safe to make cross-platform.

So I&apos;m going to say review- until you either put this inside some kind of #if or provide some evidence that clients don&apos;t rely on this behavior on Mac OS X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107092</commentid>
    <comment_count>3</comment_count>
      <attachid>27051</attachid>
    <who name="Genevieve Mak">gen</who>
    <bug_when>2009-01-26 14:58:53 -0800</bug_when>
    <thetext>Created attachment 27051
Updated Patch

Thanks, fixed issues #1 and #2. For issue #4 I&apos;ve also put an &quot;#if PLATFORM() around the fix in order to preserve the status quo. For #3 wouldn&apos;t it be up to whomever implements the browser to handle? I could see why you might want default blank pages for the &quot;about&quot; protocol but I&apos;m not sure MainResourceLoader is the right place. When using Qt, MainResourceLoader gets a hold of the request before  QNetworkReplyHandler even gets a chance to let the browser look at it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108007</commentid>
    <comment_count>4</comment_count>
      <attachid>27051</attachid>
    <who name="George Staikos">staikos</who>
    <bug_when>2009-02-02 12:38:02 -0800</bug_when>
    <thetext>Comment on attachment 27051
Updated Patch

Seems to have addressed the issues.  Looks okay to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108028</commentid>
    <comment_count>5</comment_count>
    <who name="George Staikos">staikos</who>
    <bug_when>2009-02-02 13:50:00 -0800</bug_when>
    <thetext>Applied in r40491

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>26980</attachid>
            <date>2009-01-23 12:51:10 -0800</date>
            <delta_ts>2009-01-26 14:58:53 -0800</delta_ts>
            <desc>Patch and logfile</desc>
            <filename>about.patch</filename>
            <type>text/plain</type>
            <size>1177</size>
            <attacher name="Genevieve Mak">gen</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2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5RG9jdW1lbnQoY29uc3QgS1VSTCYgdXJsKQogewotICAgIHJl
dHVybiB1cmwuaXNFbXB0eSgpIHx8IGVxdWFsSWdub3JpbmdDYXNlKFN0cmluZyh1cmwucHJvdG9j
b2woKSksICJhYm91dCIpOworICAgIHJldHVybiB1cmwuaXNFbXB0eSgpIHx8IChlcXVhbElnbm9y
aW5nQ2FzZSh1cmwucHJvdG9jb2woKSwgImFib3V0IikgJiYgZXF1YWxJZ25vcmluZ0Nhc2UodXJs
LnBhdGgoKS5zdHJpcFdoaXRlU3BhY2UoKSwgImJsYW5rIikpOwogfQogCiB2b2lkIE1haW5SZXNv
dXJjZUxvYWRlcjo6Y29udGludWVBZnRlckNvbnRlbnRQb2xpY3koUG9saWN5QWN0aW9uIGNvbnRl
bnRQb2xpY3ksIGNvbnN0IFJlc291cmNlUmVzcG9uc2UmIHIpCg==
</data>
<flag name="review"
          id="12939"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>27051</attachid>
            <date>2009-01-26 14:58:53 -0800</date>
            <delta_ts>2009-02-02 12:38:02 -0800</delta_ts>
            <desc>Updated Patch</desc>
            <filename>about2.patch</filename>
            <type>text/plain</type>
            <size>1270</size>
            <attacher name="Genevieve Mak">gen</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
NzA4ODVlOS4uYTY4OWIyYyAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxMiBAQAorMjAwOS0wMS0yMyAgR2VuZXZpZXZlIE1h
ayAgPGdlbkBzdGFpa29zLm5ldD4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMh
KS4KKworICAgICAgICBGaXggc2hvd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sKKyNlbHNlIAorICAgIHJldHVybiB1cmwuaXNFbXB0eSgp
IHx8IHVybC5wcm90b2NvbElzKCJhYm91dCIpOworI2VuZGlmCiB9CiAKIHZvaWQgTWFpblJlc291
cmNlTG9hZGVyOjpjb250aW51ZUFmdGVyQ29udGVudFBvbGljeShQb2xpY3lBY3Rpb24gY29udGVu
dFBvbGljeSwgY29uc3QgUmVzb3VyY2VSZXNwb25zZSYgcikKZGlmZiAtLWdpdCBhL1dlYktpdC5w
cm8gYi9XZWJLaXQucHJvCg==
</data>
<flag name="review"
          id="13008"
          type_id="1"
          status="+"
          setter="staikos"
    />
          </attachment>
      

    </bug>

</bugzilla>