Bug 51596

Summary: [Windows 7 Release Tests] http/tests/xmlhttprequest/basic-auth-nouser.html and basic-auth-nopassword.html failing since introduction in r74609
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: New BugsAssignee: Brent Fulgham <bfulgham>
Status: NEW ---    
Severity: Normal CC: abarth, ap, aroben, bfulgham, eric, jberlin, jhanssen, jhoneycutt, webkit.review.bot
Priority: P2 Keywords: InRadar, LayoutTestFailure, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: All   
OS: Windows 7   

Description Jessie Berlin 2010-12-24 11:16:56 PST
http://trac.webkit.org/changeset/74609

http://build.webkit.org/results/Windows%207%20Release%20(Tests)/r74632%20(7730)/http/tests/xmlhttprequest/basic-auth-nouser-pretty-diff.html
http://build.webkit.org/results/Windows%207%20Release%20(Tests)/r74632%20(7730)/http/tests/xmlhttprequest/basic-auth-nopassword-pretty-diff.html

I am not entirely sure why it is not finding those php files, but I am not at all familiar with how we are serving those files. Any ideas?

I will commit these failing results soon so that the bot is green.
Comment 1 Jan Erik Hanssen 2010-12-24 11:24:46 PST
(In reply to comment #0)
> I am not entirely sure why it is not finding those php files, but I am not at all familiar with how we are serving those files. Any ideas?
> 
> I will commit these failing results soon so that the bot is green.

The URL is wrong at least, the initial "/xmlhttprequest/" part is what makes this fail most likely, though I'm not sure where that comes from. Perhaps some peculiarity with how DRT's queueLoad() works on Windows?
Comment 2 Jessie Berlin 2010-12-24 11:42:30 PST
Failing results landed in r74645:
http://trac.webkit.org/changeset/74645

There is a FIXME: We should do real relative URL resolution here in LayoutTestControllerWin's queueLoad. Maybe that is the culprit?
Comment 3 Jan Erik Hanssen 2010-12-24 11:53:54 PST
(In reply to comment #2)
> Failing results landed in r74645:
> http://trac.webkit.org/changeset/74645
> 
> There is a FIXME: We should do real relative URL resolution here in LayoutTestControllerWin's queueLoad. Maybe that is the culprit?

Looking at the code it certainly looks that way, it doesn't seem to support absolute URL input at all.
Comment 4 Jessie Berlin 2010-12-24 12:13:58 PST
The thing that gets passed to the WorkQueue to load from LayoutTestControllerWin's queueLoad is

 "file:///C:/cygwin/home/jessieberlin/WebKit/OpenSource/LayoutTests/http/tests/xmlhttprequest/http://user:@localhost:8000/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php"

so the issue is probably somewhere in how WorkQueue loads that (because the output makes it appear that it knows enough to strip out the first part but is failing to strip out the /xmlhttprequest/ part of the first part).

Right now the only connection to a Windows machine I have is a remote connection, so it will take me a bit to do any further debugging (so painfully slow ...)
Comment 5 Jan Erik Hanssen 2010-12-24 12:28:25 PST
(In reply to comment #4)
> Right now the only connection to a Windows machine I have is a remote connection, so it will take me a bit to do any further debugging (so painfully slow ...)

The problem appears to be in LayoutTestController::queueLoad() itself:

    // FIXME: We should do real relative URL resolution here.
    int lastSlash = responseURL.rfind('/');
    if (lastSlash != -1)
        responseURL = responseURL.substr(0, lastSlash);

    wstring wURL = jsStringRefToWString(url);
    wstring wAbsoluteURL = responseURL + TEXT("/") + wURL;

I haven't actually executed this code (No easy access to a Windows box here either at the moment), but since wURL at that point is the URL input to queueLoad(), responseURL will be "/xmlhttprequest/". The code appears to attempt to generate an absolute URL out of a relative one.
Comment 6 Jan Erik Hanssen 2010-12-24 12:31:07 PST
(In reply to comment #5)
> I haven't actually executed this code (No easy access to a Windows box here either at the moment), but since wURL at that point is the URL input to queueLoad(), responseURL will be "/xmlhttprequest/". The code appears to attempt to generate an absolute URL out of a relative one.

A possible solution could be to check if the URL is an absolute one (i.e. starts with http://) and then skip this part if that is the case.
Comment 7 Jessie Berlin 2010-12-24 12:41:25 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Right now the only connection to a Windows machine I have is a remote connection, so it will take me a bit to do any further debugging (so painfully slow ...)
> 
> The problem appears to be in LayoutTestController::queueLoad() itself:
> 
>     // FIXME: We should do real relative URL resolution here.
>     int lastSlash = responseURL.rfind('/');
>     if (lastSlash != -1)
>         responseURL = responseURL.substr(0, lastSlash);
> 
>     wstring wURL = jsStringRefToWString(url);
>     wstring wAbsoluteURL = responseURL + TEXT("/") + wURL;
> 
> I haven't actually executed this code (No easy access to a Windows box here either at the moment), but since wURL at that point is the URL input to queueLoad(), responseURL will be "/xmlhttprequest/". The code appears to attempt to generate an absolute URL out of a relative one.

responseURL is actually "ile:///C:/cygwin/home/jessieberlin/WebKit/OpenSource/LayoutTests/http/tests/xmlhttprequest/"

(since it is rfind and this is actually what I saw when stepping through the function). I don't know why it later is truncated to /xmlhttprequest/.

I would be fine with changing it to check if the URL is absolute. I will try out that solution when I get the windows machine to respond and see if it breaks anything else.
Comment 8 Jessie Berlin 2011-01-24 12:16:22 PST
<rdar://problem/8908387>
Comment 9 Jessie Berlin 2011-02-25 13:21:42 PST
http/tests/xmlhttprequest/basic-auth-nopassword.html has been timing out on the Windows XP Debug test bots for longer than we have records of the layout test results:

http://build.webkit.org/old-results/Windows%20XP%20Debug%20(Tests)/r76975%20(24675)/results.html
http://build.webkit.org/results/Windows%20XP%20Debug%20(Tests)/r79718%20(25674)/results.html

I am going to add it to the Windows XP skipped list soon.
Comment 10 Adam Roben (:aroben) 2011-02-25 13:25:31 PST
(In reply to comment #9)
> http/tests/xmlhttprequest/basic-auth-nopassword.html has been timing out on the Windows XP Debug test bots for longer than we have records of the layout test results:
> 
> http://build.webkit.org/old-results/Windows%20XP%20Debug%20(Tests)/r76975%20(24675)/results.html
> http://build.webkit.org/results/Windows%20XP%20Debug%20(Tests)/r79718%20(25674)/results.html
> 
> I am going to add it to the Windows XP skipped list soon.

I wish we had a debug skipped list. Presumably the timeout is due to Debug builds being slow, not due to something about Windows XP.
Comment 11 Adam Roben (:aroben) 2011-02-25 13:28:16 PST
Did we ever fix the URL-resolution issue?
Comment 12 Jessie Berlin 2011-02-25 13:36:47 PST
(In reply to comment #11)
> Did we ever fix the URL-resolution issue?

No, I didn't get around to it yet.

Filed a bug about having Debug vs. Release skipped lists: https://bugs.webkit.org/show_bug.cgi?id=55254
Comment 13 Jessie Berlin 2011-02-25 13:41:01 PST
Added http/tests/xmlhttprequest/basic-auth-nopassword.html to the win-xp skipped list in http://trac.webkit.org/changeset/79723
Comment 14 WebKit Review Bot 2011-02-25 17:15:48 PST
http://trac.webkit.org/changeset/79723 might have broken GTK Linux 32-bit Debug and Qt Linux Release
The following tests are not passing:
fast/table/fixed-with-auto-with-colspan-vertical.html
Comment 15 Adam Roben (:aroben) 2011-03-01 05:57:23 PST
http/tests/xmlhttprequest/basic-auth-nouser.html has been timing out on Windows XP, too:

http://build.webkit.org/results/Windows%20XP%20Debug%20(Tests)/r79988%20(25825)/results.html
Comment 16 Adam Roben (:aroben) 2011-03-01 05:57:47 PST
Added http/tests/xmlhttprequest/basic-auth-nouser.html to the Skipped file

Committed r79994: <http://trac.webkit.org/changeset/79994>
Comment 17 WebKit Review Bot 2011-03-01 08:39:20 PST
http://trac.webkit.org/changeset/79994 might have broken GTK Linux 32-bit Debug
Comment 18 Adam Roben (:aroben) 2011-04-29 09:30:32 PDT
Moved the skipped entries from win-xp to win.
Comment 19 Adam Roben (:aroben) 2011-04-29 09:30:59 PDT
...in r85329.
Comment 20 Adam Roben (:aroben) 2011-04-29 09:52:07 PDT
See also bug 52978.
Comment 21 Eric Seidel (no email) 2011-04-29 10:42:22 PDT
This whole directory is flaky on Mac.  We have some sort of marauding http-test failure which we don't understand.  I've done some investigation in:
https://bugs.webkit.org/show_bug.cgi?id=51613
We've also had to skip tests in that directory before:
https://bugs.webkit.org/show_bug.cgi?id=32961

I wonder if CFNetwork may have some http-auth oddities.
Comment 22 Brent Fulgham 2015-01-28 15:41:29 PST
It seems (at present) to be a security settings issue:

--- /cygdrive/c/Projects/WebKit/OpenSource/WebKitBuild/Release/bin32/layout-test-results/http/tests/xmlhttprequest/basic-auth-nouser-expected.txt
+++ /cygdrive/c/Projects/WebKit/OpenSource/WebKitBuild/Release/bin32/layout-test-results/http/tests/xmlhttprequest/basic-auth-nouser-actual.txt
@@ -1,4 +1,4 @@
-Not Found
+Forbidden
 
-The requested URL /xmlhttprequest/http://:password@localhost:8000/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php was not found on this server.
-Apache/1.3.33 Server at 127.0.0.1 Port 8000
+You don't have permission to access /xmlhttprequest/http://:password@localhost:8000/xmlhttprequest/resources/basic-auth-nouserpass/basic-auth-nouserpass.php on this server.
+Apache/2.4.10 (Win32) OpenSSL/1.0.1h PHP/5.4.0 Server at 127.0.0.1 Port 80