WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144333
[Win] PHP scripts fail if HTTP_ORIGIN is not set
https://bugs.webkit.org/show_bug.cgi?id=144333
Summary
[Win] PHP scripts fail if HTTP_ORIGIN is not set
Brent Fulgham
Reported
2015-04-28 09:23:13 PDT
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
Attachments
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2015-04-28 09:59:17 PDT
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.
Brent Fulgham
Comment 2
2015-04-28 10:03:39 PDT
It doesn't appear that there are any other PHP tests suffering from this problem.
Brent Fulgham
Comment 3
2015-04-28 10:06:41 PDT
Committed
r183483
: <
http://trac.webkit.org/changeset/183483
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug