[Webkit-unassigned] [Bug 22350] New: Allow layout tests to run in php cgi mode
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 18 19:44:39 PST 2008
https://bugs.webkit.org/show_bug.cgi?id=22350
Summary: Allow layout tests to run in php cgi mode
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Tools / Tests
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: deanm at chromium.org
There are a bunch of layout tests written in php that call getallheaders().
This is only implemented for mod_php, and is really implemented by apache.
For Chromium, we're running php through lighttpd. I wrote an shim to that gets
us by, however it's a pain to have everyone update their php.ini files. I
think it shouldn't be too hard to modify the php layout tests to access headers
in a way that works under both mod_php and php as a CGI.
Btw, here is my shim, which might help to illustrate what I'm talking about.
<?php
// This is a compat shim to make our php-cgi act more like apache mod_php.
// http://www.qijoo.com/fapm/PHP/en/function.getallheaders.html
// Well, sort of, lighttpd gives us headers like HTTP_UPPERCASE_WEE, and so
// we do some ugly php to make that Uppercase-Wee...
function getallheaders() {
foreach($_SERVER as $name => $value) {
if(substr($name, 0, 5) == 'HTTP_') {
$name = strtolower(substr($name, 5));
$name = join("-", array_map('ucwords', explode("_", $name)));
$headers[$name] = $value;
}
}
return $headers;
}
?>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list