For some reason, the Windows port does not populate the HTTP_ORIGIN header value: "Notice: Undefined index: HTTP_ORIGIN in C:\Projects\WebKit\OpenSource\LayoutTests\http\tests\security\resources\cors-post-redirect-target.php on line 5 There was no origin header" However, we appear to make all the same calls to 'setOrigin' as the Mac port, which does provide this field in the HTTP header. This discrepancy is causing these tests to fail (and perhaps others): http/tests/security/cors-post-redirect-301.html http/tests/security/cors-post-redirect-302.html http/tests/security/cors-post-redirect-303.html http/tests/security/cors-post-redirect-307.html http/tests/security/cors-post-redirect-308.html
My initial understanding of this problem was wrong. Tests are failing because of a difference in Windows PHP versus its behavior on the Mac: (a) Mac treats a missing HTTP_ORIGIN 'key' in the HTTP header as a null value. (b) Win treats a missing HTTP_ORIGIN 'key' in the HTTP header as a failure and terminates the script. The fix is to check if the key is set before proceeding, which works properly on Windows and Mac. I will do a quick search of other PHP files to see if this is the cause of other Windows failures.
It doesn't appear that there are any other PHP tests suffering from this problem.
Committed r183483: <http://trac.webkit.org/changeset/183483>