Changeset 13751 in webkit


Ignore:
Timestamp:
Apr 9, 2006 9:40:28 PM (18 years ago)
Author:
ap
Message:

Reviewed by Darin.

Test: http/tests/xmlhttprequest/basic-auth.html

  • platform/KURL.cpp: (KURL::setUser): Enable a code path that handles non-empty user name - it was already present, but commented out and protected with an assertion. (KURL::setPass): Ditto.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r13748 r13751  
     12006-04-09  Alexey Proskuryakov  <ap@nypop.com>
     2
     3        Reviewed by Darin.
     4
     5        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7877
     6        XMLHttpRequest ignores username/password passed to open()
     7
     8        * http/tests/xmlhttprequest/basic-auth-expected.txt: Added.
     9        * http/tests/xmlhttprequest/basic-auth.html: Added.
     10        * http/tests/xmlhttprequest/resources/basic-auth.php: Added.
     11
    1122006-04-09  Darin Adler  <darin@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r13748 r13751  
     12006-04-09  Alexey Proskuryakov  <ap@nypop.com>
     2
     3        Reviewed by Darin.
     4
     5        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7877
     6        XMLHttpRequest ignores username/password passed to open()
     7
     8        Test: http/tests/xmlhttprequest/basic-auth.html
     9
     10        * platform/KURL.cpp:
     11        (KURL::setUser): Enable a code path that handles non-empty user name -
     12        it was already present, but commented out and protected with an assertion.
     13        (KURL::setPass): Ditto.
     14
    1152006-04-09  Darin Adler  <darin@apple.com>
    216
  • trunk/WebCore/platform/KURL.cpp

    r13577 r13751  
    606606        int end = userEndPos;
    607607        if (!user.isEmpty()) {
    608             // Untested code, but this is never used.
    609             ASSERT_NOT_REACHED();
    610 #if 0
    611608            u = user;
    612             if (userStartPos == schemeEndPos + 1) {
     609            if (userStartPos == schemeEndPos + 1)
    613610                u = "//" + u;
    614             }
    615611            // Add '@' if we didn't have one before.
    616             if (end == hostEndPos || (end == passwordEndPos && urlString[end] != '@')) {
     612            if (end == hostEndPos || (end == passwordEndPos && urlString[end] != '@'))
    617613                u += '@';
    618             }
    619 #endif
    620614        } else {
    621615            // Remove '@' if we now have neither user nor password.
    622             if (userEndPos == passwordEndPos && end != hostEndPos && urlString[end] == '@') {
     616            if (userEndPos == passwordEndPos && end != hostEndPos && urlString[end] == '@')
    623617                end += 1;
    624             }
    625618        }
    626619        const DeprecatedString newURL = urlString.left(userStartPos) + u + urlString.mid(end);
     
    635628        int end = passwordEndPos;
    636629        if (!password.isEmpty()) {
    637             // Untested code, but this is never used.
    638             ASSERT_NOT_REACHED();
    639 #if 0
    640630            p = ':' + password + '@';
    641             if (userEndPos == schemeEndPos + 1) {
     631            if (userEndPos == schemeEndPos + 1)
    642632                p = "//" + p;
    643             }
    644633            // Eat the existing '@' since we are going to add our own.
    645             if (end != hostEndPos && urlString[end] == '@') {
     634            if (end != hostEndPos && urlString[end] == '@')
    646635                end += 1;
    647             }
    648 #endif
    649636        } else {
    650637            // Remove '@' if we now have neither user nor password.
    651             if (userStartPos == userEndPos && end != hostEndPos && urlString[end] == '@') {
     638            if (userStartPos == userEndPos && end != hostEndPos && urlString[end] == '@')
    652639                end += 1;
    653             }
    654640        }
    655641        const DeprecatedString newURL = urlString.left(userEndPos) + p + urlString.mid(end);
Note: See TracChangeset for help on using the changeset viewer.