[LayoutTests] Convert http/tests/misc convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221981
<rdar://problem/74399686>
Reviewed by Jonathan Bedard.
* http/tests/fetch/fetch-in-worker.js:
* http/tests/misc/401-alternative-content-expected.txt:
* http/tests/misc/401-alternative-content.php: Removed.
* http/tests/misc/401-alternative-content.py: Added.
* http/tests/misc/async-script-removed.html:
* http/tests/misc/async-script.html:
* http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
* http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html:
* http/tests/misc/authentication-redirect-1/resources/auth-echo.php: Removed.
* http/tests/misc/authentication-redirect-1/resources/auth-echo.py: Added.
* http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.php: Removed.
* http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.py: Added.
* http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
* http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html:
* http/tests/misc/authentication-redirect-2/resources/auth-echo.php: Removed.
* http/tests/misc/authentication-redirect-2/resources/auth-echo.py: Added.
* http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.php: Removed.
* http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.py: Added.
* http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
* http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html:
* http/tests/misc/authentication-redirect-3/resources/auth-echo.php: Removed.
* http/tests/misc/authentication-redirect-3/resources/auth-echo.py: Added.
* http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php: Removed.
* http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py: Added.
* http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.php: Removed.
* http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.py: Added.
* http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
* http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html:
* http/tests/misc/authentication-redirect-4/resources/auth-echo.php: Removed.
* http/tests/misc/authentication-redirect-4/resources/auth-echo.py: Added.
* http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.php: Removed.
* http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.py: Added.
* http/tests/misc/bad-charset-alias.html:
* http/tests/misc/before-unload-load-image.html:
* http/tests/misc/char-encoding-bocu-1-blocklisted.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-default.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html:
* http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html:
* http/tests/misc/char-encoding-in-text-charset-field-with-value.html:
* http/tests/misc/char-encoding-scsu-blocklisted.html:
* http/tests/misc/char-encoding-without-charset-field.html:
* http/tests/misc/charset-sniffer-end-sniffing.html:
* http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt:
* http/tests/misc/css-reject-any-type-in-strict-mode.html:
* http/tests/misc/dns-prefetch-control.html:
* http/tests/misc/embed-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/empty-file-formdata.html:
* http/tests/misc/extract-http-content-language-against-equiv.php: Removed.
* http/tests/misc/extract-http-content-language-against-equiv.py: Added.
* http/tests/misc/extract-http-content-language-malformed.php: Removed.
* http/tests/misc/extract-http-content-language-malformed.py: Added.
* http/tests/misc/extract-http-content-language-multiple.php: Removed.
* http/tests/misc/extract-http-content-language-multiple.py: Added.
* http/tests/misc/extract-http-content-language.php: Removed.
* http/tests/misc/extract-http-content-language.py: Added.
* http/tests/misc/form-blob-challenge.html:
* http/tests/misc/form-post-textplain-cross-site.html:
* http/tests/misc/form-post-textplain.html:
* http/tests/misc/form-submit-file-cross-site-redirect.html:
* http/tests/misc/form-submit-file-cross-site.html:
* http/tests/misc/image-checks-for-accept.html:
* http/tests/misc/image-error.html:
* http/tests/misc/image-input-type-outlives-gc-without-crashing.html:
* http/tests/misc/image-load-outlives-gc-without-crashing.html:
* http/tests/misc/javascript-url-stop-loaders.html:
* http/tests/misc/large-js-program.php: Removed.
* http/tests/misc/large-js-program.py: Added.
* http/tests/misc/location-with-space.php: Removed.
* http/tests/misc/location-with-space.py: Added.
* http/tests/misc/mask-image-accept.html:
* http/tests/misc/object-image-error.html:
* http/tests/misc/object-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/redirect-to-about-blank.html:
* http/tests/misc/redirect-to-external-url-expected.txt:
* http/tests/misc/redirect-with-quotes.php: Removed.
* http/tests/misc/redirect-with-quotes.py: Added.
* http/tests/misc/redirect.php: Removed.
* http/tests/misc/redirect.py: Added.
* http/tests/misc/referrer.html:
* http/tests/misc/refresh-headers.php: Removed.
* http/tests/misc/refresh-headers.py: Added.
* http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.php: Removed.
* http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.py: Added.
* http/tests/misc/resources/404image.php: Removed.
* http/tests/misc/resources/404image.py: Added.
* http/tests/misc/resources/SVGFont-delayed-loader.svg:
* http/tests/misc/resources/bad-charset-alias.php: Removed.
* http/tests/misc/resources/bad-charset-alias.py: Added.
* http/tests/misc/resources/basic-echo-post.php: Removed.
* http/tests/misc/resources/basic-echo-post.py: Added.
* http/tests/misc/resources/bocu-1-cyrillic.php: Removed.
* http/tests/misc/resources/bocu-1-cyrillic.py: Added.
* http/tests/misc/resources/char-encoding-in-hidden-charset-field.php: Removed.
* http/tests/misc/resources/char-encoding-in-hidden-charset-field.py: Added.
* http/tests/misc/resources/charset-sniffer-end-sniffing.php: Removed.
* http/tests/misc/resources/charset-sniffer-end-sniffing.py: Added.
* http/tests/misc/resources/check-keygen-post.php: Removed.
* http/tests/misc/resources/check-keygen-post.py: Added.
* http/tests/misc/resources/check-test-file.php: Removed.
* http/tests/misc/resources/check-test-file.py: Added.
* http/tests/misc/resources/check-unnamed-file-included-in-formdata.php: Removed.
* http/tests/misc/resources/check-unnamed-file-included-in-formdata.py: Added.
* http/tests/misc/resources/delayed-log.php: Removed.
* http/tests/misc/resources/delayed-log.py: Added.
* http/tests/misc/resources/dns-prefetch-control.php: Removed.
* http/tests/misc/resources/dns-prefetch-control.py: Added.
* http/tests/misc/resources/echo-query-param.php: Removed.
* http/tests/misc/resources/echo-query-param.py: Added.
* http/tests/misc/resources/form-post-textplain.php: Removed.
* http/tests/misc/resources/form-post-textplain.py: Added.
* http/tests/misc/resources/hang-connection.php: Removed.
* http/tests/misc/resources/hang-connection.py: Added.
* http/tests/misc/resources/image-checks-for-accept.php: Removed.
* http/tests/misc/resources/image-checks-for-accept.py: Added.
* http/tests/misc/resources/nested-iframe-loading-another-iframe.html:
* http/tests/misc/resources/protected/protected-image.php: Removed.
* http/tests/misc/resources/protected/protected-image.py: Added.
* http/tests/misc/resources/random-no-store.php: Removed.
* http/tests/misc/resources/random-no-store.py: Added.
* http/tests/misc/resources/redirect-result.php: Removed.
* http/tests/misc/resources/redirect-result.py: Added.
* http/tests/misc/resources/redirect-step2.php: Removed.
* http/tests/misc/resources/redirect-step2.py: Added.
* http/tests/misc/resources/redirect-step3.php: Removed.
* http/tests/misc/resources/redirect-step3.py: Added.
* http/tests/misc/resources/redirect-step4.php: Removed.
* http/tests/misc/resources/redirect-step4.py: Added.
* http/tests/misc/resources/redirect-to-about-blank.php: Removed.
* http/tests/misc/resources/redirect-to-about-blank.py: Added.
* http/tests/misc/resources/redirect-to-external-url-iframe.html:
* http/tests/misc/resources/redirect-to-external-url.php: Removed.
* http/tests/misc/resources/redirect-to-external-url.py: Added.
* http/tests/misc/resources/referrer-main-resource.php: Removed.
* http/tests/misc/resources/referrer-main-resource.py: Added.
* http/tests/misc/resources/referrer-result.php: Removed.
* http/tests/misc/resources/referrer-result.py: Added.
* http/tests/misc/resources/script-500.php: Removed.
* http/tests/misc/resources/script-500.py: Added.
* http/tests/misc/resources/scsu-cyrillic.php: Removed.
* http/tests/misc/resources/scsu-cyrillic.py: Added.
* http/tests/misc/resources/send-async-xhr.html:
* http/tests/misc/resources/slowimage.php: Removed.
* http/tests/misc/resources/slowimage.py: Added.
* http/tests/misc/resources/stylesheet-bad-mime-type.php: Removed.
* http/tests/misc/resources/stylesheet-bad-mime-type.py: Added.
* http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.php: Removed.
* http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.py: Added.
* http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.php: Removed.
* http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.py: Added.
* http/tests/misc/script-500.html:
* http/tests/misc/script-no-store.html:
* http/tests/misc/submit-post-keygen.html:
* http/tests/misc/svg-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/timer-vs-loading.html:
* http/tests/misc/url-in-utf16be.html:
* http/tests/misc/url-in-utf16le.html:
* http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/webtiming-cross-origin-and-back1.html:
* http/tests/misc/webtiming-cross-origin-redirect.php: Removed.
* http/tests/misc/webtiming-cross-origin-redirect.py: Added.
* http/tests/misc/webtiming-one-redirect.php: Removed.
* http/tests/misc/webtiming-one-redirect.py: Added.
* http/tests/misc/webtiming-slow-load.php: Removed.
* http/tests/misc/webtiming-slow-load.py: Added.
* http/tests/misc/webtiming-ssl.php: Removed.
* http/tests/misc/webtiming-ssl.py: Added.
* http/tests/misc/webtiming-two-redirects.php: Removed.
* http/tests/misc/webtiming-two-redirects.py: Added.
* http/tests/misc/xhtml.php: Removed.
* http/tests/misc/xhtml.py: Added.
* http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html:
* http/tests/xmlhttprequest/resetting-timeout-to-zero.html:
* http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html:
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@273819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f0dc18b..bcd31bd 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,199 @@
+2021-03-03 Chris Gambrell <cgambrell@apple.com>
+
+ [LayoutTests] Convert http/tests/misc convert PHP to Python
+ https://bugs.webkit.org/show_bug.cgi?id=221981
+ <rdar://problem/74399686>
+
+ Reviewed by Jonathan Bedard.
+
+ * http/tests/fetch/fetch-in-worker.js:
+ * http/tests/misc/401-alternative-content-expected.txt:
+ * http/tests/misc/401-alternative-content.php: Removed.
+ * http/tests/misc/401-alternative-content.py: Added.
+ * http/tests/misc/async-script-removed.html:
+ * http/tests/misc/async-script.html:
+ * http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
+ * http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html:
+ * http/tests/misc/authentication-redirect-1/resources/auth-echo.php: Removed.
+ * http/tests/misc/authentication-redirect-1/resources/auth-echo.py: Added.
+ * http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.php: Removed.
+ * http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.py: Added.
+ * http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
+ * http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html:
+ * http/tests/misc/authentication-redirect-2/resources/auth-echo.php: Removed.
+ * http/tests/misc/authentication-redirect-2/resources/auth-echo.py: Added.
+ * http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.php: Removed.
+ * http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.py: Added.
+ * http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
+ * http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html:
+ * http/tests/misc/authentication-redirect-3/resources/auth-echo.php: Removed.
+ * http/tests/misc/authentication-redirect-3/resources/auth-echo.py: Added.
+ * http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php: Removed.
+ * http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py: Added.
+ * http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.php: Removed.
+ * http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.py: Added.
+ * http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
+ * http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html:
+ * http/tests/misc/authentication-redirect-4/resources/auth-echo.php: Removed.
+ * http/tests/misc/authentication-redirect-4/resources/auth-echo.py: Added.
+ * http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.php: Removed.
+ * http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.py: Added.
+ * http/tests/misc/bad-charset-alias.html:
+ * http/tests/misc/before-unload-load-image.html:
+ * http/tests/misc/char-encoding-bocu-1-blocklisted.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-default.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html:
+ * http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html:
+ * http/tests/misc/char-encoding-in-text-charset-field-with-value.html:
+ * http/tests/misc/char-encoding-scsu-blocklisted.html:
+ * http/tests/misc/char-encoding-without-charset-field.html:
+ * http/tests/misc/charset-sniffer-end-sniffing.html:
+ * http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt:
+ * http/tests/misc/css-reject-any-type-in-strict-mode.html:
+ * http/tests/misc/dns-prefetch-control.html:
+ * http/tests/misc/embed-image-load-outlives-gc-without-crashing.html:
+ * http/tests/misc/empty-file-formdata.html:
+ * http/tests/misc/extract-http-content-language-against-equiv.php: Removed.
+ * http/tests/misc/extract-http-content-language-against-equiv.py: Added.
+ * http/tests/misc/extract-http-content-language-malformed.php: Removed.
+ * http/tests/misc/extract-http-content-language-malformed.py: Added.
+ * http/tests/misc/extract-http-content-language-multiple.php: Removed.
+ * http/tests/misc/extract-http-content-language-multiple.py: Added.
+ * http/tests/misc/extract-http-content-language.php: Removed.
+ * http/tests/misc/extract-http-content-language.py: Added.
+ * http/tests/misc/form-blob-challenge.html:
+ * http/tests/misc/form-post-textplain-cross-site.html:
+ * http/tests/misc/form-post-textplain.html:
+ * http/tests/misc/form-submit-file-cross-site-redirect.html:
+ * http/tests/misc/form-submit-file-cross-site.html:
+ * http/tests/misc/image-checks-for-accept.html:
+ * http/tests/misc/image-error.html:
+ * http/tests/misc/image-input-type-outlives-gc-without-crashing.html:
+ * http/tests/misc/image-load-outlives-gc-without-crashing.html:
+ * http/tests/misc/javascript-url-stop-loaders.html:
+ * http/tests/misc/large-js-program.php: Removed.
+ * http/tests/misc/large-js-program.py: Added.
+ * http/tests/misc/location-with-space.php: Removed.
+ * http/tests/misc/location-with-space.py: Added.
+ * http/tests/misc/mask-image-accept.html:
+ * http/tests/misc/object-image-error.html:
+ * http/tests/misc/object-image-load-outlives-gc-without-crashing.html:
+ * http/tests/misc/redirect-to-about-blank.html:
+ * http/tests/misc/redirect-to-external-url-expected.txt:
+ * http/tests/misc/redirect-with-quotes.php: Removed.
+ * http/tests/misc/redirect-with-quotes.py: Added.
+ * http/tests/misc/redirect.php: Removed.
+ * http/tests/misc/redirect.py: Added.
+ * http/tests/misc/referrer.html:
+ * http/tests/misc/refresh-headers.php: Removed.
+ * http/tests/misc/refresh-headers.py: Added.
+ * http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.php: Removed.
+ * http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.py: Added.
+ * http/tests/misc/resources/404image.php: Removed.
+ * http/tests/misc/resources/404image.py: Added.
+ * http/tests/misc/resources/SVGFont-delayed-loader.svg:
+ * http/tests/misc/resources/bad-charset-alias.php: Removed.
+ * http/tests/misc/resources/bad-charset-alias.py: Added.
+ * http/tests/misc/resources/basic-echo-post.php: Removed.
+ * http/tests/misc/resources/basic-echo-post.py: Added.
+ * http/tests/misc/resources/bocu-1-cyrillic.php: Removed.
+ * http/tests/misc/resources/bocu-1-cyrillic.py: Added.
+ * http/tests/misc/resources/char-encoding-in-hidden-charset-field.php: Removed.
+ * http/tests/misc/resources/char-encoding-in-hidden-charset-field.py: Added.
+ * http/tests/misc/resources/charset-sniffer-end-sniffing.php: Removed.
+ * http/tests/misc/resources/charset-sniffer-end-sniffing.py: Added.
+ * http/tests/misc/resources/check-keygen-post.php: Removed.
+ * http/tests/misc/resources/check-keygen-post.py: Added.
+ * http/tests/misc/resources/check-test-file.php: Removed.
+ * http/tests/misc/resources/check-test-file.py: Added.
+ * http/tests/misc/resources/check-unnamed-file-included-in-formdata.php: Removed.
+ * http/tests/misc/resources/check-unnamed-file-included-in-formdata.py: Added.
+ * http/tests/misc/resources/delayed-log.php: Removed.
+ * http/tests/misc/resources/delayed-log.py: Added.
+ * http/tests/misc/resources/dns-prefetch-control.php: Removed.
+ * http/tests/misc/resources/dns-prefetch-control.py: Added.
+ * http/tests/misc/resources/echo-query-param.php: Removed.
+ * http/tests/misc/resources/echo-query-param.py: Added.
+ * http/tests/misc/resources/form-post-textplain.php: Removed.
+ * http/tests/misc/resources/form-post-textplain.py: Added.
+ * http/tests/misc/resources/hang-connection.php: Removed.
+ * http/tests/misc/resources/hang-connection.py: Added.
+ * http/tests/misc/resources/image-checks-for-accept.php: Removed.
+ * http/tests/misc/resources/image-checks-for-accept.py: Added.
+ * http/tests/misc/resources/nested-iframe-loading-another-iframe.html:
+ * http/tests/misc/resources/protected/protected-image.php: Removed.
+ * http/tests/misc/resources/protected/protected-image.py: Added.
+ * http/tests/misc/resources/random-no-store.php: Removed.
+ * http/tests/misc/resources/random-no-store.py: Added.
+ * http/tests/misc/resources/redirect-result.php: Removed.
+ * http/tests/misc/resources/redirect-result.py: Added.
+ * http/tests/misc/resources/redirect-step2.php: Removed.
+ * http/tests/misc/resources/redirect-step2.py: Added.
+ * http/tests/misc/resources/redirect-step3.php: Removed.
+ * http/tests/misc/resources/redirect-step3.py: Added.
+ * http/tests/misc/resources/redirect-step4.php: Removed.
+ * http/tests/misc/resources/redirect-step4.py: Added.
+ * http/tests/misc/resources/redirect-to-about-blank.php: Removed.
+ * http/tests/misc/resources/redirect-to-about-blank.py: Added.
+ * http/tests/misc/resources/redirect-to-external-url-iframe.html:
+ * http/tests/misc/resources/redirect-to-external-url.php: Removed.
+ * http/tests/misc/resources/redirect-to-external-url.py: Added.
+ * http/tests/misc/resources/referrer-main-resource.php: Removed.
+ * http/tests/misc/resources/referrer-main-resource.py: Added.
+ * http/tests/misc/resources/referrer-result.php: Removed.
+ * http/tests/misc/resources/referrer-result.py: Added.
+ * http/tests/misc/resources/script-500.php: Removed.
+ * http/tests/misc/resources/script-500.py: Added.
+ * http/tests/misc/resources/scsu-cyrillic.php: Removed.
+ * http/tests/misc/resources/scsu-cyrillic.py: Added.
+ * http/tests/misc/resources/send-async-xhr.html:
+ * http/tests/misc/resources/slowimage.php: Removed.
+ * http/tests/misc/resources/slowimage.py: Added.
+ * http/tests/misc/resources/stylesheet-bad-mime-type.php: Removed.
+ * http/tests/misc/resources/stylesheet-bad-mime-type.py: Added.
+ * http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.php: Removed.
+ * http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.py: Added.
+ * http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.php: Removed.
+ * http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.py: Added.
+ * http/tests/misc/script-500.html:
+ * http/tests/misc/script-no-store.html:
+ * http/tests/misc/submit-post-keygen.html:
+ * http/tests/misc/svg-image-load-outlives-gc-without-crashing.html:
+ * http/tests/misc/timer-vs-loading.html:
+ * http/tests/misc/url-in-utf16be.html:
+ * http/tests/misc/url-in-utf16le.html:
+ * http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html:
+ * http/tests/misc/webtiming-cross-origin-and-back1.html:
+ * http/tests/misc/webtiming-cross-origin-redirect.php: Removed.
+ * http/tests/misc/webtiming-cross-origin-redirect.py: Added.
+ * http/tests/misc/webtiming-one-redirect.php: Removed.
+ * http/tests/misc/webtiming-one-redirect.py: Added.
+ * http/tests/misc/webtiming-slow-load.php: Removed.
+ * http/tests/misc/webtiming-slow-load.py: Added.
+ * http/tests/misc/webtiming-ssl.php: Removed.
+ * http/tests/misc/webtiming-ssl.py: Added.
+ * http/tests/misc/webtiming-two-redirects.php: Removed.
+ * http/tests/misc/webtiming-two-redirects.py: Added.
+ * http/tests/misc/xhtml.php: Removed.
+ * http/tests/misc/xhtml.py: Added.
+ * http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html:
+ * http/tests/xmlhttprequest/resetting-timeout-to-zero.html:
+ * http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html:
+ * platform/gtk/TestExpectations:
+ * platform/ios/TestExpectations:
+ * platform/mac/TestExpectations:
+ * platform/win/TestExpectations:
+ * platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt:
+ * platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
+ * platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
+ * platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
+ * platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
+
2021-03-03 Youenn Fablet <youenn@apple.com>
[GPUP] imported/w3c/web-platform-tests/webrtc/RTCRtpSender-replaceTrack.https.html times out with GPU Process enabled
diff --git a/LayoutTests/http/tests/fetch/fetch-in-worker.js b/LayoutTests/http/tests/fetch/fetch-in-worker.js
index 1af3b55..ce557c9 100644
--- a/LayoutTests/http/tests/fetch/fetch-in-worker.js
+++ b/LayoutTests/http/tests/fetch/fetch-in-worker.js
@@ -3,7 +3,7 @@
if (e.data !== "start")
return;
- var promise1 = fetch("/misc/resources/delayed-log.php?delay=100").then(() => {
+ var promise1 = fetch("/misc/resources/delayed-log.py?delay=100").then(() => {
postMessage("FAIL: promise 1 resolved");
}, () => {
postMessage("FAIL: promise 1 rejected");
diff --git a/LayoutTests/http/tests/misc/401-alternative-content-expected.txt b/LayoutTests/http/tests/misc/401-alternative-content-expected.txt
index e61607c..9f33cad 100644
--- a/LayoutTests/http/tests/misc/401-alternative-content-expected.txt
+++ b/LayoutTests/http/tests/misc/401-alternative-content-expected.txt
@@ -1,2 +1,2 @@
-http://127.0.0.1:8000/misc/401-alternative-content.php - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet
+http://127.0.0.1:8000/misc/401-alternative-content.py - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet
PASS
diff --git a/LayoutTests/http/tests/misc/401-alternative-content.php b/LayoutTests/http/tests/misc/401-alternative-content.php
deleted file mode 100644
index c8f642d..0000000
--- a/LayoutTests/http/tests/misc/401-alternative-content.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
- if (!isset($_SERVER['PHP_AUTH_USER'])) {
- header('WWW-Authenticate: Basic realm="Please press Cancel"');
- header('HTTP/1.0 401 Unauthorized');
- header('Content-Type: text/html');
- echo '<script>';
- echo ' if (window.testRunner)';
- echo ' testRunner.dumpAsText();';
- echo '</script>';
- echo 'PASS';
- exit;
- } else {
- echo "FAIL: Why do you have credentials?";
- }
-?>
diff --git a/LayoutTests/http/tests/misc/401-alternative-content.py b/LayoutTests/http/tests/misc/401-alternative-content.py
new file mode 100755
index 0000000..90479e2
--- /dev/null
+++ b/LayoutTests/http/tests/misc/401-alternative-content.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+username = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')[0]
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if not username:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm="Please press Cancel"\r\n'
+ 'status: 401\r\n\r\n'
+ '<script>\n'
+ ' if (window.testRunner)\n'
+ ' testRunner.dumpAsText();\n'
+ '</script>\n'
+ 'PASS\n'
+ )
+else:
+ sys.stdout.write('\r\nFAIL: Why do you have credentials?')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/async-script-removed.html b/LayoutTests/http/tests/misc/async-script-removed.html
index 6e32275..698f0db 100644
--- a/LayoutTests/http/tests/misc/async-script-removed.html
+++ b/LayoutTests/http/tests/misc/async-script-removed.html
@@ -25,17 +25,17 @@
<script>
// All these scripts should be executed after the next script tag.
var s1 = document.createElement("script");
- s1.src = "resources/delayed-log.php?delay=3&msg=1";
+ s1.src = "resources/delayed-log.py?delay=3&msg=1";
s1.async = false;
document.body.appendChild(s1);
var s2 = document.createElement("script");
- s2.src = "resources/delayed-log.php?delay=2&msg=2";
+ s2.src = "resources/delayed-log.py?delay=2&msg=2";
s2.async = false;
document.body.appendChild(s2);
var s3 = document.createElement("script");
- s3.src = "resources/delayed-log.php?delay=1&msg=3&done=1";
+ s3.src = "resources/delayed-log.py?delay=1&msg=3&done=1";
s3.async = false;
document.body.appendChild(s3);
diff --git a/LayoutTests/http/tests/misc/async-script.html b/LayoutTests/http/tests/misc/async-script.html
index 74d091f..6a58e83 100644
--- a/LayoutTests/http/tests/misc/async-script.html
+++ b/LayoutTests/http/tests/misc/async-script.html
@@ -13,7 +13,7 @@
function test() {
var s = document.createElement("script");
- s.src = "resources/delayed-log.php?delay=1&msg=PASS&done=1";
+ s.src = "resources/delayed-log.py?delay=1&msg=PASS&done=1";
s.async = true;
document.body.appendChild(s);
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt b/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
index 516e0d6..2767f5c 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
+++ b/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
@@ -1,7 +1,7 @@
-http://localhost:8000/misc/authentication-redirect-1/resources/auth-then-redirect.php?redirect=301 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
+http://localhost:8000/misc/authentication-redirect-1/resources/auth-then-redirect.py?redirect=301 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=40138
You should load this page at 127.0.0.1:8000 so localhost:8000 is considered a different security origin.
-This test loads a php script which demands http authentication, then uses it to redirect to another script in a different origin that shows what authentication headers were sent with the final request.
+This test loads a py script which demands http authentication, then uses it to redirect to another script in a different origin that shows what authentication headers were sent with the final request.
It does this once each for HTTP 301, 302, 303, and 307 redirects.
If not running under DRT, enter any credentials when asked.
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html b/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
index 3bbd08d..5293875 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
+++ b/LayoutTests/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
@@ -30,7 +30,7 @@
function appendFrame(code)
{
i = document.createElement("iframe");
- i.setAttribute("src", "http://localhost:8000/misc/authentication-redirect-1/resources/auth-then-redirect.php?redirect=" + code);
+ i.setAttribute("src", "http://localhost:8000/misc/authentication-redirect-1/resources/auth-then-redirect.py?redirect=" + code);
i.setAttribute("onload", "frameLoaded()");
document.body.appendChild(i);
}
@@ -40,7 +40,7 @@
<body onload="appendFrame('301');">
https://bugs.webkit.org/show_bug.cgi?id=40138<br>
You should load this page at 127.0.0.1:8000 so localhost:8000 is considered a different security origin.<br>
-This test loads a php script which demands http authentication, then uses it to redirect to another script in a different origin that shows what authentication headers were sent with the final request.<br>
+This test loads a py script which demands http authentication, then uses it to redirect to another script in a different origin that shows what authentication headers were sent with the final request.<br>
It does this once each for HTTP 301, 302, 303, and 307 redirects.<br>
If not running under DRT, enter any credentials when asked.<br>
</body>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-echo.php b/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-echo.php
deleted file mode 100644
index 9590e7a..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-echo.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-echo "Resource loaded with HTTP authentication username '", $_SERVER["PHP_AUTH_USER"], "' and password '", $_SERVER["PHP_AUTH_PW"], "'\n";
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-echo.py b/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-echo.py
new file mode 100755
index 0000000..05046a0
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-echo.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ 'Resource loaded with HTTP authentication username \'{}\' and password \'{}\'\n'.format(username, password)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.php b/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.php
deleted file mode 100644
index 204e0c9..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-// prompt for login if not already present
-if (!strlen($_SERVER["PHP_AUTH_USER"]) || !strlen($_SERVER["PHP_AUTH_PW"]))
-{
- header("WWW-Authenticate: Basic realm=\"http/tests/misc/authentication-redirect-1\"");
- header("HTTP/1.0 401 Unauthorized");
- exit;
-}
-
-// do redirect if called for
-$redirect_codes=array("301", "302", "303", "307");
-if (in_array($_GET["redirect"], $redirect_codes))
-{
- header("Location: http://127.0.0.1:8000/misc/authentication-redirect-1/resources/auth-echo.php", true, $_GET["redirect"]);
- exit;
-}
-
-echo "Unknown redirect parameter sent";
-
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.py b/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.py
new file mode 100755
index 0000000..78591cf
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+from urllib.parse import parse_qs
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+redirect = query = int(parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('redirect', [200])[0])
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if not username or not password:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm="http/tests/misc/authentication-redirect-1"\r\n'
+ 'status: 401\r\n\r\n'
+ )
+else:
+ if redirect in [301, 302, 303, 307]:
+ sys.stdout.write(
+ 'Location: http://127.0.0.1:8000/misc/authentication-redirect-1/resources/auth-echo.py\r\n'
+ 'status: {}\r\n\r\n'.format(redirect)
+ )
+ else:
+ sys.stdout.write('\r\nUnknown redirect parameter sent')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt b/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
index df1d842..7160ca3 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
+++ b/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
@@ -1,7 +1,7 @@
-http://127.0.0.1:8000/misc/authentication-redirect-2/resources/auth-then-redirect.php?redirect=301 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
+http://127.0.0.1:8000/misc/authentication-redirect-2/resources/auth-then-redirect.py?redirect=301 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=66354
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.
-This test loads a php script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
+This test loads a py script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
It does this once each for HTTP 301, 302, 303, and 307 redirects.
If not running under DRT, enter any credentials when asked.
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html b/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
index fd38d11..e35f44c 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
+++ b/LayoutTests/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
@@ -30,7 +30,7 @@
function appendFrame(code)
{
i = document.createElement("iframe");
- i.setAttribute("src", "http://127.0.0.1:8000/misc/authentication-redirect-2/resources/auth-then-redirect.php?redirect=" + code);
+ i.setAttribute("src", "http://127.0.0.1:8000/misc/authentication-redirect-2/resources/auth-then-redirect.py?redirect=" + code);
i.setAttribute("onload", "frameLoaded()");
document.body.appendChild(i);
}
@@ -40,7 +40,7 @@
<body onload="appendFrame('301');">
https://bugs.webkit.org/show_bug.cgi?id=66354<br>
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.<br>
-This test loads a php script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.<br>
+This test loads a py script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.<br>
It does this once each for HTTP 301, 302, 303, and 307 redirects.<br>
If not running under DRT, enter any credentials when asked.<br>
</body>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-echo.php b/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-echo.php
deleted file mode 100644
index 9590e7a..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-echo.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-echo "Resource loaded with HTTP authentication username '", $_SERVER["PHP_AUTH_USER"], "' and password '", $_SERVER["PHP_AUTH_PW"], "'\n";
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-echo.py b/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-echo.py
new file mode 100755
index 0000000..05046a0
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-echo.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ 'Resource loaded with HTTP authentication username \'{}\' and password \'{}\'\n'.format(username, password)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.php b/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.php
deleted file mode 100644
index 4c5cc74..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-// prompt for login if not already present
-if (!strlen($_SERVER["PHP_AUTH_USER"]) || !strlen($_SERVER["PHP_AUTH_PW"]))
-{
- header("WWW-Authenticate: Basic realm=\"http/tests/misc/authentication-redirect-2\"");
- header("HTTP/1.0 401 Unauthorized");
- exit;
-}
-
-// do redirect if called for
-$redirect_codes=array("301", "302", "303", "307");
-if (in_array($_GET["redirect"], $redirect_codes))
-{
- header("Location: http://127.0.0.1:8000/misc/authentication-redirect-2/resources/auth-echo.php", true, $_GET["redirect"]);
- exit;
-}
-
-echo "Unknown redirect parameter sent";
-
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.py b/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.py
new file mode 100755
index 0000000..269142d
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+from urllib.parse import parse_qs
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+redirect = int(parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('redirect', [200])[0])
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if not username or not password:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm="http/tests/misc/authentication-redirect-2"\r\n'
+ 'status: 401\r\n\r\n'
+ )
+else:
+ if redirect in [301, 302, 303, 307]:
+ sys.stdout.write(
+ 'Location: http://127.0.0.1:8000/misc/authentication-redirect-2/resources/auth-echo.py\r\n'
+ 'status: {}\r\n\r\n'.format(redirect)
+ )
+ else:
+ sys.stdout.write('\r\nUnknown redirect parameter sent')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt b/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
index 963b580..360fc46 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
+++ b/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
@@ -1,7 +1,7 @@
-http://127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php?redirect=301 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
+http://127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py?redirect=301 - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=66354
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.
-This test loads a php script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
+This test loads a py script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
The redirect includes credentials in the location url, and they should be preferred over credentials that WebCore has cached.
It does this once each for HTTP 301, 302, 303, and 307 redirects.
If not running under DRT, enter any credentials when asked.
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html b/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
index c06bde7..724009e 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
+++ b/LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
@@ -30,7 +30,7 @@
function appendFrame(code)
{
i = document.createElement("iframe");
- i.setAttribute("src", "http://127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php?redirect=" + code);
+ i.setAttribute("src", "http://127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py?redirect=" + code);
i.setAttribute("onload", "frameLoaded()");
document.body.appendChild(i);
}
@@ -40,7 +40,7 @@
<body onload="appendFrame('301');">
https://bugs.webkit.org/show_bug.cgi?id=66354<br>
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.<br>
-This test loads a php script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.<br>
+This test loads a py script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.<br>
The redirect includes credentials in the location url, and they should be preferred over credentials that WebCore has cached.<br>
It does this once each for HTTP 301, 302, 303, and 307 redirects.<br>
If not running under DRT, enter any credentials when asked.<br>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-echo.php b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-echo.php
deleted file mode 100644
index 9590e7a..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-echo.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-echo "Resource loaded with HTTP authentication username '", $_SERVER["PHP_AUTH_USER"], "' and password '", $_SERVER["PHP_AUTH_PW"], "'\n";
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-echo.py b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-echo.py
new file mode 100755
index 0000000..05046a0
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-echo.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ 'Resource loaded with HTTP authentication username \'{}\' and password \'{}\'\n'.format(username, password)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php
deleted file mode 100644
index 0540ab5..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-// prompt for login if not already present
-if (!strlen($_SERVER["PHP_AUTH_USER"]) || !strlen($_SERVER["PHP_AUTH_PW"]))
-{
- header("WWW-Authenticate: Basic realm=\"http/tests/misc/authentication-redirect-3\"");
- header("HTTP/1.0 401 Unauthorized");
- exit;
-}
-
-// do redirect if called for
-$redirect_codes=array("301", "302", "303", "307");
-if (in_array($_GET["redirect"], $redirect_codes))
-{
- header("Location: http://redirectuser:redirectpassword@127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-then-redirect.php?redirect=" . $_GET["redirect"], true, $_GET["redirect"]);
- exit;
-}
-
-echo "Unknown redirect parameter sent";
-
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py
new file mode 100755
index 0000000..a8535f6
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+from urllib.parse import parse_qs
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+redirect = int(parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('redirect', [200])[0])
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if not username or not password:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm="http/tests/misc/authentication-redirect-3"\r\n'
+ 'status: 401\r\n\r\n'
+ )
+else:
+ if redirect in [301, 302, 303, 307]:
+ sys.stdout.write(
+ 'Location: http://redirectuser:redirectpassword@127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-then-redirect.py?redirect={redirect}\r\n'
+ 'status: {redirect}\r\n\r\n'.format(redirect=redirect))
+ else:
+ sys.stdout.write('\r\nUnknown redirect parameter sent')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.php b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.php
deleted file mode 100644
index e259279..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-// prompt for login if not already present
-if (!strlen($_SERVER["PHP_AUTH_USER"]) || !strlen($_SERVER["PHP_AUTH_PW"]))
-{
- header("WWW-Authenticate: Basic realm=\"http/tests/misc/authentication-redirect-3\"");
- header("HTTP/1.0 401 Unauthorized");
- exit;
-}
-
-// do redirect if called for
-$redirect_codes=array("301", "302", "303", "307");
-if (in_array($_GET["redirect"], $redirect_codes))
-{
- header("Location: http://127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-echo.php", true, $_GET["redirect"]);
- exit;
-}
-
-echo "Unknown redirect parameter sent";
-
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.py b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.py
new file mode 100755
index 0000000..c24fbb0
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+from urllib.parse import parse_qs
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+redirect = int(parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('redirect', [200])[0])
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if not username or not password:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm="http/tests/misc/authentication-redirect-3"\r\n'
+ 'status: 401\r\n\r\n'
+ )
+else:
+ if redirect in [301, 302, 303, 307]:
+ sys.stdout.write(
+ 'Location: http://127.0.0.1:8000/misc/authentication-redirect-3/resources/auth-echo.py\r\n'
+ 'status: {}\r\n\r\n'.format(redirect)
+ )
+ else:
+ sys.stdout.write('\r\nUnknown redirect parameter sent')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt b/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
index 441b119..b3f9b84 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
+++ b/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
@@ -1,11 +1,11 @@
-http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-then-redirect.php?redirect - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
+http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-then-redirect.py?redirect - didReceiveAuthenticationChallenge - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=105190
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.
-This test loads a php script which demands http authentication, then uses it to redirect via 301 to another script in the same origin that shows what authentication headers were sent with the final request. It verifies that the credentials are not placed in the final URL.
+This test loads a py script which demands http authentication, then uses it to redirect via 301 to another script in the same origin that shows what authentication headers were sent with the final request. It verifies that the credentials are not placed in the final URL.
If not running under DRT, enter any credentials when asked.
--------
Frame: '<!--frame1-->'
--------
-http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-echo.php loaded with HTTP authentication username 'testUser' and password 'testPassword'
+http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-echo.py loaded with HTTP authentication username 'testUser' and password 'testPassword'
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html b/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html
index a905498..42505e0 100644
--- a/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html
+++ b/LayoutTests/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html
@@ -12,7 +12,7 @@
function appendFrame()
{
i = document.createElement("iframe");
- i.setAttribute("src", "http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-then-redirect.php?redirect");
+ i.setAttribute("src", "http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-then-redirect.py?redirect");
document.body.appendChild(i);
}
@@ -21,7 +21,7 @@
<body onload="appendFrame();">
https://bugs.webkit.org/show_bug.cgi?id=105190<br>
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.<br>
-This test loads a php script which demands http authentication, then uses it to redirect via 301 to another script in the same origin that shows what authentication headers were sent with the final request. It verifies that the credentials are not placed in the final URL.<br>
+This test loads a py script which demands http authentication, then uses it to redirect via 301 to another script in the same origin that shows what authentication headers were sent with the final request. It verifies that the credentials are not placed in the final URL.<br>
If not running under DRT, enter any credentials when asked.<br>
</body>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-echo.php b/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-echo.php
deleted file mode 100644
index 164a00f..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-echo.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<script>
- document.write(document.location);
- document.write(" loaded with HTTP authentication username '<? echo $_SERVER["PHP_AUTH_USER"] ?>' and password '<? echo $_SERVER["PHP_AUTH_PW"] ?>'");
- if (window.testRunner)
- window.testRunner.notifyDone();
-</script>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-echo.py b/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-echo.py
new file mode 100755
index 0000000..6c18870
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-echo.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<script>\n'
+ ' document.write(document.location);\n'
+ ' document.write(" loaded with HTTP authentication username \'{}\' and password \'{}\'");\n'
+ ' if (window.testRunner)\n'
+ ' window.testRunner.notifyDone();\n'
+ '</script>\n'.format(username, password)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.php b/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.php
deleted file mode 100644
index 04c6734..0000000
--- a/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-if (!strlen($_SERVER["PHP_AUTH_USER"]) || !strlen($_SERVER["PHP_AUTH_PW"]))
-{
- header("WWW-Authenticate: Basic realm=\"WebKit Authentication Redirect 4\"");
- header("HTTP/1.0 401 Unauthorized");
- exit;
-}
-
-header("Location: http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-echo.php", true, 301);
-exit;
-
-?>
diff --git a/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.py b/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.py
new file mode 100755
index 0000000..0bf2d8b
--- /dev/null
+++ b/LayoutTests/http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if not username or not password:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm="WebKit Authentication Redirect 4"\r\n'
+ 'status: 401\r\n\r\n'
+ )
+else:
+ sys.stdout.write(
+ 'Location: http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-echo.py\r\n'
+ 'status: 301\r\n\r\n'
+ )
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/bad-charset-alias.html b/LayoutTests/http/tests/misc/bad-charset-alias.html
index d741a58..943afac 100644
--- a/LayoutTests/http/tests/misc/bad-charset-alias.html
+++ b/LayoutTests/http/tests/misc/bad-charset-alias.html
@@ -29,7 +29,7 @@
for (i = 0; i < aliases.length; ++i) {
var ifr = document.createElement("iframe");
- ifr.setAttribute("src", "resources/bad-charset-alias.php?charset=" + aliases[i]);
+ ifr.setAttribute("src", "resources/bad-charset-alias.py?charset=" + aliases[i]);
document.body.appendChild(ifr);
}
diff --git a/LayoutTests/http/tests/misc/before-unload-load-image.html b/LayoutTests/http/tests/misc/before-unload-load-image.html
index 94b49aa..45c6ef9 100644
--- a/LayoutTests/http/tests/misc/before-unload-load-image.html
+++ b/LayoutTests/http/tests/misc/before-unload-load-image.html
@@ -39,7 +39,7 @@
if (isDone)
return;
var image = new contentWindow.Image;
- image.src = "http://127.0.0.1:8000/misc/resources/protected/protected-image.php";
+ image.src = "http://127.0.0.1:8000/misc/resources/protected/protected-image.py";
}
diff --git a/LayoutTests/http/tests/misc/char-encoding-bocu-1-blocklisted.html b/LayoutTests/http/tests/misc/char-encoding-bocu-1-blocklisted.html
index a8d4d8d..f1515b0 100644
--- a/LayoutTests/http/tests/misc/char-encoding-bocu-1-blocklisted.html
+++ b/LayoutTests/http/tests/misc/char-encoding-bocu-1-blocklisted.html
@@ -22,7 +22,7 @@
finishJSTest();
}
</script>
-<iframe id="bocu1Frame" src="resources/bocu-1-cyrillic.php" onload="run()"></iframe>
+<iframe id="bocu1Frame" src="resources/bocu-1-cyrillic.py" onload="run()"></iframe>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-default.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-default.html
index f3ac256..33b4604 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-default.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-default.html
@@ -10,7 +10,7 @@
<p>
This should submit _charset_=iso8559-1. Note that this _charset_ input has a value before it submits, which is overwritten. IE6 submits windows1252, because all pages are evidently Unicode in IE6. The point is that it submits the charset we're using, not what exactly it submits.</p>
-<form name="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post">
+<form name="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post">
<input type=hidden name="_charset_" value="This value should change">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html
index b6e918f..a33db88 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit one _charset_=Big5</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" accept-charset="Big5">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" accept-charset="Big5">
<input type=hidden name="_charset_">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html
index 6b4279b..30a93b8 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit one _charset_=EUC-JP</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" accept-charset="EUC-JP">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" accept-charset="EUC-JP">
<input type=hidden name="_charset_">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html
index ec062b2..b7a543b 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit one _charset_=ISO-2022-JP</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" accept-charset="ISO-2022-JP">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" accept-charset="ISO-2022-JP">
<input type=hidden name="_charset_">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html
index 87bf235..bfdd825 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit one _charset_=Shift_JIS</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" accept-charset="Shift_JIS">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" accept-charset="Shift_JIS">
<input type=hidden name="_charset_">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html
index c728460..d8cd8e1 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit two _charset_=UTF-8. IE6 submits windows1252.</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" accept-charset="UTF-8">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" accept-charset="UTF-8">
<input type=hidden name="_charset_">
<input type=hidden name="_charset_">
<input type=submit>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html
index 8d9e201..3cff9f9 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit one _charset_=UTF-8</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" accept-charset="UTF-8">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" accept-charset="UTF-8">
<input type=hidden name="_charset_">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html
index 6f649ee..f602387 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit one _charset_=UTF-8, for post method and enctype text/plain</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" enctype="text/plain" accept-charset="UTF-8">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" enctype="text/plain" accept-charset="UTF-8">
<input type=hidden name="_charset_">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-in-text-charset-field-with-value.html b/LayoutTests/http/tests/misc/char-encoding-in-text-charset-field-with-value.html
index bca9130..fd66491 100644
--- a/LayoutTests/http/tests/misc/char-encoding-in-text-charset-field-with-value.html
+++ b/LayoutTests/http/tests/misc/char-encoding-in-text-charset-field-with-value.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit _charset_=I\'m a little input, short and stout</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post">
<input type=text name="_charset_" value="I'm a little input, short and stout">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/char-encoding-scsu-blocklisted.html b/LayoutTests/http/tests/misc/char-encoding-scsu-blocklisted.html
index 1cd26b4..d9c9995 100644
--- a/LayoutTests/http/tests/misc/char-encoding-scsu-blocklisted.html
+++ b/LayoutTests/http/tests/misc/char-encoding-scsu-blocklisted.html
@@ -22,7 +22,7 @@
finishJSTest();
}
</script>
-<iframe id="scsuFrame" src="resources/scsu-cyrillic.php" onload="run()"></iframe>
+<iframe id="scsuFrame" src="resources/scsu-cyrillic.py" onload="run()"></iframe>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
diff --git a/LayoutTests/http/tests/misc/char-encoding-without-charset-field.html b/LayoutTests/http/tests/misc/char-encoding-without-charset-field.html
index e7f8f90..e29d3ee 100644
--- a/LayoutTests/http/tests/misc/char-encoding-without-charset-field.html
+++ b/LayoutTests/http/tests/misc/char-encoding-without-charset-field.html
@@ -8,7 +8,7 @@
</p>
<p>This should submit nothing except the header</p>
-<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.php" method="post" accept-charset="UTF-8">
+<form id="testForm" action="resources/char-encoding-in-hidden-charset-field.py" method="post" accept-charset="UTF-8">
<input type=submit>
</form>
diff --git a/LayoutTests/http/tests/misc/charset-sniffer-end-sniffing.html b/LayoutTests/http/tests/misc/charset-sniffer-end-sniffing.html
index ed54dc1..b3447a4 100644
--- a/LayoutTests/http/tests/misc/charset-sniffer-end-sniffing.html
+++ b/LayoutTests/http/tests/misc/charset-sniffer-end-sniffing.html
@@ -43,7 +43,7 @@
</script>
<body onload="test()">
<pre id="log"></pre>
-<iframe id="frame" src="resources/charset-sniffer-end-sniffing.php"></iframe>
+<iframe id="frame" src="resources/charset-sniffer-end-sniffing.py"></iframe>
<p>This test is for a bug where the charset sniffer would not stop looking
for charset if the body contains no tags. Charset sniffer is supposed to stop
looking for charset after 1024 bytes.</p>
diff --git a/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt b/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt
index 5ebf4bc..bd43bd7 100644
--- a/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt
+++ b/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.php' because non CSS MIME types are not allowed in strict mode.
+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/misc/resources/stylesheet-bad-mime-type.py' because non CSS MIME types are not allowed in strict mode.
Related test to http://bugs.webkit.org/show_bug.cgi?id=11451 REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded). Making sure that in strict mode we would not load such a stylesheet.
SUCCESS
diff --git a/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode.html b/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode.html
index 11146ef..33ce5fb 100644
--- a/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode.html
+++ b/LayoutTests/http/tests/misc/css-reject-any-type-in-strict-mode.html
@@ -2,7 +2,7 @@
<html>
<head>
<title></title>
- <link rel="stylesheet" href="resources/stylesheet-bad-mime-type.php">
+ <link rel="stylesheet" href="resources/stylesheet-bad-mime-type.py">
<script>
function test()
{
diff --git a/LayoutTests/http/tests/misc/dns-prefetch-control.html b/LayoutTests/http/tests/misc/dns-prefetch-control.html
index b284ac5..a128181 100644
--- a/LayoutTests/http/tests/misc/dns-prefetch-control.html
+++ b/LayoutTests/http/tests/misc/dns-prefetch-control.html
@@ -53,21 +53,21 @@
<script>emitFrameForScheme("https:")</script>
<script>emitFrameForScheme("ftp:")</script>
<script>emitFrameForHost("%")</script>
- <iframe src="resources/dns-prefetch-control.php"></iframe>
- <iframe src="resources/dns-prefetch-control.php?value=on"></iframe>
- <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.php?value=on"></iframe>
+ <iframe src="resources/dns-prefetch-control.py"></iframe>
+ <iframe src="resources/dns-prefetch-control.py?value=on"></iframe>
+ <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.py?value=on"></iframe>
</div>
<p style='clear: left'>The following frames contain links that are not expected to cause a DNS prefetch.</p>
<div>
- <iframe src="resources/dns-prefetch-control.php?value=off"></iframe>
- <iframe src="resources/dns-prefetch-control.php?value=foo"></iframe>
- <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.php"></iframe>
- <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.php?value=off"></iframe>
- <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.php?value=foo"></iframe>
- <iframe src="data:text/html,<meta http-equiv='x-dns-prefetch-control' value='off'><iframe src='http://127.0.0.1:8000/misc/resources/dns-prefetch-control.php'></iframe>"></iframe>
- <iframe src="data:text/html,<meta http-equiv='x-dns-prefetch-control' value='on'><iframe src='https://127.0.0.1:8443/misc/resources/dns-prefetch-control.php'></iframe>"></iframe>
+ <iframe src="resources/dns-prefetch-control.py?value=off"></iframe>
+ <iframe src="resources/dns-prefetch-control.py?value=foo"></iframe>
+ <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.py"></iframe>
+ <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.py?value=off"></iframe>
+ <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.py?value=foo"></iframe>
+ <iframe src="data:text/html,<meta http-equiv='x-dns-prefetch-control' value='off'><iframe src='http://127.0.0.1:8000/misc/resources/dns-prefetch-control.py'></iframe>"></iframe>
+ <iframe src="data:text/html,<meta http-equiv='x-dns-prefetch-control' value='on'><iframe src='https://127.0.0.1:8443/misc/resources/dns-prefetch-control.py'></iframe>"></iframe>
</div>
</body>
diff --git a/LayoutTests/http/tests/misc/embed-image-load-outlives-gc-without-crashing.html b/LayoutTests/http/tests/misc/embed-image-load-outlives-gc-without-crashing.html
index 3d7b6cb..0c62287 100644
--- a/LayoutTests/http/tests/misc/embed-image-load-outlives-gc-without-crashing.html
+++ b/LayoutTests/http/tests/misc/embed-image-load-outlives-gc-without-crashing.html
@@ -19,7 +19,7 @@
This has an embed element representing an image. That embed element is wrapped in a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.<br>
<div id="thediv">
-<embed type="image/gif" src="resources/slowimage.php">
+<embed type="image/gif" src="resources/slowimage.py">
</embed>
</div>
</body>
diff --git a/LayoutTests/http/tests/misc/empty-file-formdata.html b/LayoutTests/http/tests/misc/empty-file-formdata.html
index 7fa300a..3f4efa7 100644
--- a/LayoutTests/http/tests/misc/empty-file-formdata.html
+++ b/LayoutTests/http/tests/misc/empty-file-formdata.html
@@ -15,7 +15,7 @@
</script>
</head>
<body>
-<form enctype="multipart/form-data" method="POST" action="resources/check-unnamed-file-included-in-formdata.php">
+<form enctype="multipart/form-data" method="POST" action="resources/check-unnamed-file-included-in-formdata.py">
<input name="data" type="file"></input>
</form>
</body>
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language-against-equiv.php b/LayoutTests/http/tests/misc/extract-http-content-language-against-equiv.php
deleted file mode 100644
index 9ee0566..0000000
--- a/LayoutTests/http/tests/misc/extract-http-content-language-against-equiv.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
- header("Content-Language: zh-CN");
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="content-language" content="en-GB">
-<script src="../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:
-Extract HTTP Content-Language header.</p>
-<div id="console"></div>
-<div id="x"></div>
-<div id="y" lang="ar"></div>
-<script>
- debug('==> Value extracted from meta "http-equiv" and overriding HTTP "Content-Language"...');
- shouldBe('window.getComputedStyle(document.getElementById("x")).webkitLocale', '"en-GB"')
- debug('==> Value set by div "lang" tag...');
- shouldBe('window.getComputedStyle(document.getElementById("y")).webkitLocale', '"ar"')
- debug('==> All done...');
-</script>
-<script src="../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language-against-equiv.py b/LayoutTests/http/tests/misc/extract-http-content-language-against-equiv.py
new file mode 100755
index 0000000..dd5c1ac
--- /dev/null
+++ b/LayoutTests/http/tests/misc/extract-http-content-language-against-equiv.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Language: zh-CN\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ '<!DOCTYPE html>\n'
+ '<html xmlns="http://www.w3.org/1999/xhtml">\n'
+ '<head>\n'
+ '<meta http-equiv="content-language" content="en-GB">\n'
+ '<script src="../../js-test-resources/js-test-pre.js"></script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:\n'
+ 'Extract HTTP Content-Language header.</p>\n'
+ '<div id="console"></div>\n'
+ '<div id="x"></div>\n'
+ '<div id="y" lang="ar"></div>\n'
+ '<script>\n'
+ ' debug(\'==> Value extracted from meta "http-equiv" and overriding HTTP "Content-Language"...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("x")).webkitLocale\', \'"en-GB"\')\n'
+ ' debug(\'==> Value set by div "lang" tag...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("y")).webkitLocale\', \'"ar"\')\n'
+ ' debug(\'==> All done...\');\n'
+ '</script>\n'
+ '<script src="../../js-test-resources/js-test-post.js"></script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language-malformed.php b/LayoutTests/http/tests/misc/extract-http-content-language-malformed.php
deleted file mode 100644
index ae57054..0000000
--- a/LayoutTests/http/tests/misc/extract-http-content-language-malformed.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
- header("Content-Language: ,es");
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:
-Extract HTTP Content-Language header.</p>
-<div id="console"></div>
-<div id="x"></div>
-<div id="y" lang="ar"></div>
-<script>
- debug('==> Value extracted from malformed HTTP "Content-Language" header...');
- // A malformed header may be fixed by the browser ("es") or left bad and so remain unset ("auto").
- // Chrome does the former; Safari does the latter.
- shouldBeTrue('window.getComputedStyle(document.getElementById("x")).webkitLocale == "es" || window.getComputedStyle(document.getElementById("x")).webkitLocale == "auto"')
- debug('==> Value set by div "lang" tag...');
- shouldBe('window.getComputedStyle(document.getElementById("y")).webkitLocale', '"ar"')
- debug('==> All done...');
-</script>
-<script src="../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language-malformed.py b/LayoutTests/http/tests/misc/extract-http-content-language-malformed.py
new file mode 100755
index 0000000..b419cd4
--- /dev/null
+++ b/LayoutTests/http/tests/misc/extract-http-content-language-malformed.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Language: ,es\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ '<!DOCTYPE html>\n'
+ '<html xmlns="http://www.w3.org/1999/xhtml">\n'
+ '<head>\n'
+ '<script src="../../js-test-resources/js-test-pre.js"></script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:\n'
+ 'Extract HTTP Content-Language header.</p>\n'
+ '<div id="console"></div>\n'
+ '<div id="x"></div>\n'
+ '<div id="y" lang="ar"></div>\n'
+ '<script>\n'
+ ' debug(\'==> Value extracted from malformed HTTP "Content-Language" header...\');\n'
+ ' // A malformed header may be fixed by the browser ("es") or left bad and so remain unset ("auto").\n'
+ ' // Chrome does the former; Safari does the latter.\n'
+ ' shouldBeTrue(\'window.getComputedStyle(document.getElementById("x")).webkitLocale == "es" || window.getComputedStyle(document.getElementById("x")).webkitLocale == "auto"\')\n'
+ ' debug(\'==> Value set by div "lang" tag...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("y")).webkitLocale\', \'"ar"\')\n'
+ ' debug(\'==> All done...\');\n'
+ '</script>\n'
+ '<script src="../../js-test-resources/js-test-post.js"></script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language-multiple.php b/LayoutTests/http/tests/misc/extract-http-content-language-multiple.php
deleted file mode 100644
index 3605c3a..0000000
--- a/LayoutTests/http/tests/misc/extract-http-content-language-multiple.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
- header("Content-Language: fr \t , fi ");
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:
-Extract HTTP Content-Language header.</p>
-<div id="console"></div>
-<div id="x"></div>
-<div id="y" lang="ar"></div>
-<script>
- debug('==> Value extracted singly from HTTP "Content-Language" header...');
- shouldBe('window.getComputedStyle(document.getElementById("x")).webkitLocale', '"fr"')
- debug('==> Value set by div "lang" tag...');
- shouldBe('window.getComputedStyle(document.getElementById("y")).webkitLocale', '"ar"')
- debug('==> All done...');
-</script>
-<script src="../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language-multiple.py b/LayoutTests/http/tests/misc/extract-http-content-language-multiple.py
new file mode 100755
index 0000000..051366c
--- /dev/null
+++ b/LayoutTests/http/tests/misc/extract-http-content-language-multiple.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Language: fr \t , fi \r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ '<!DOCTYPE html>\n'
+ '<html xmlns="http://www.w3.org/1999/xhtml">\n'
+ '<head>\n'
+ '<script src="../../js-test-resources/js-test-pre.js"></script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:\n'
+ 'Extract HTTP Content-Language header.</p>\n'
+ '<div id="console"></div>\n'
+ '<div id="x"></div>\n'
+ '<div id="y" lang="ar"></div>\n'
+ '<script>\n'
+ ' debug(\'==> Value extracted singly from HTTP "Content-Language" header...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("x")).webkitLocale\', \'"fr"\')\n'
+ ' debug(\'==> Value set by div "lang" tag...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("y")).webkitLocale\', \'"ar"\')\n'
+ ' debug(\'==> All done...\');\n'
+ '</script>\n'
+ '<script src="../../js-test-resources/js-test-post.js"></script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language.php b/LayoutTests/http/tests/misc/extract-http-content-language.php
deleted file mode 100644
index 2a117f2..0000000
--- a/LayoutTests/http/tests/misc/extract-http-content-language.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
- header("Content-Language: zh-CN");
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:
-Extract HTTP Content-Language header.</p>
-<div id="console"></div>
-<div id="x"></div>
-<div id="y" lang="ar"></div>
-<script>
- debug('==> Value extracted from HTTP "Content-Language" header...');
- shouldBe('window.getComputedStyle(document.getElementById("x")).webkitLocale', '"zh-CN"')
- debug('==> Value set by div "lang" tag...');
- shouldBe('window.getComputedStyle(document.getElementById("y")).webkitLocale', '"ar"')
- debug('==> All done...');
-</script>
-<script src="../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/extract-http-content-language.py b/LayoutTests/http/tests/misc/extract-http-content-language.py
new file mode 100755
index 0000000..507184a
--- /dev/null
+++ b/LayoutTests/http/tests/misc/extract-http-content-language.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Language: zh-CN\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ '<!DOCTYPE html>\n'
+ '<html xmlns="http://www.w3.org/1999/xhtml">\n'
+ '<head>\n'
+ '<script src="../../js-test-resources/js-test-pre.js"></script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=97929">bug 97929</a>:\n'
+ 'Extract HTTP Content-Language header.</p>\n'
+ '<div id="console"></div>\n'
+ '<div id="x"></div>\n'
+ '<div id="y" lang="ar"></div>\n'
+ '<script>\n'
+ ' debug(\'==> Value extracted from HTTP "Content-Language" header...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("x")).webkitLocale\', \'"zh-CN"\')\n'
+ ' debug(\'==> Value set by div "lang" tag...\');\n'
+ ' shouldBe(\'window.getComputedStyle(document.getElementById("y")).webkitLocale\', \'"ar"\')\n'
+ ' debug(\'==> All done...\');\n'
+ '</script>\n'
+ '<script src="../../js-test-resources/js-test-post.js"></script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/form-blob-challenge.html b/LayoutTests/http/tests/misc/form-blob-challenge.html
index 04fe005..b5fcc0e 100644
--- a/LayoutTests/http/tests/misc/form-blob-challenge.html
+++ b/LayoutTests/http/tests/misc/form-blob-challenge.html
@@ -15,6 +15,6 @@
testRunner.notifyDone();
}
};
-xhr.open("POST", "resources/basic-echo-post.php", true, "testuser", "testpassword");
+xhr.open("POST", "resources/basic-echo-post.py", true, "testuser", "testpassword");
xhr.send(formData);
</script>
diff --git a/LayoutTests/http/tests/misc/form-post-textplain-cross-site.html b/LayoutTests/http/tests/misc/form-post-textplain-cross-site.html
index 9d45eee..1bdf620 100644
--- a/LayoutTests/http/tests/misc/form-post-textplain-cross-site.html
+++ b/LayoutTests/http/tests/misc/form-post-textplain-cross-site.html
@@ -8,7 +8,7 @@
forms POSTed with a content-type of text/plain actually send data in text/plain when cross-site.
</p>
-<form enctype="text/plain" method="post" action="http://localhost:8000/misc/resources/form-post-textplain.php" name="f">
+<form enctype="text/plain" method="post" action="http://localhost:8000/misc/resources/form-post-textplain.py" name="f">
<input type="hidden" name="f1" value="This is field #1 &!@$% ='<>">
<input type="hidden" name="f2" value='This is field #2 ""'>
<input type="submit" value="press me">
diff --git a/LayoutTests/http/tests/misc/form-post-textplain.html b/LayoutTests/http/tests/misc/form-post-textplain.html
index a2ad8e9..1967134 100644
--- a/LayoutTests/http/tests/misc/form-post-textplain.html
+++ b/LayoutTests/http/tests/misc/form-post-textplain.html
@@ -9,7 +9,7 @@
forms POSTed with a content-type of text/plain actually send data in text/plain
</p>
-<form enctype="text/plain" method="post" action="resources/form-post-textplain.php" name="f">
+<form enctype="text/plain" method="post" action="resources/form-post-textplain.py" name="f">
<input type="hidden" name="f1" value="This is field #1 &!@$% ='<>">
<input type="hidden" name="f2" value='This is field #2 ""'>
<input type="submit" value="press me">
diff --git a/LayoutTests/http/tests/misc/form-submit-file-cross-site-redirect.html b/LayoutTests/http/tests/misc/form-submit-file-cross-site-redirect.html
index 48d65c6..370f9f5 100644
--- a/LayoutTests/http/tests/misc/form-submit-file-cross-site-redirect.html
+++ b/LayoutTests/http/tests/misc/form-submit-file-cross-site-redirect.html
@@ -34,7 +34,7 @@
</script>
</head>
<body>
-<form enctype="multipart/form-data" method="POST" action="/resources/redirect.py?code=307&url=http%3A%2F%2Flocalhost%3A8000%2Fmisc%2Fresources%2Fcheck-test-file.php">
+<form enctype="multipart/form-data" method="POST" action="/resources/redirect.py?code=307&url=http%3A%2F%2Flocalhost%3A8000%2Fmisc%2Fresources%2Fcheck-test-file.py">
<input name="data" type="file"></input>
</form>
</body>
diff --git a/LayoutTests/http/tests/misc/form-submit-file-cross-site.html b/LayoutTests/http/tests/misc/form-submit-file-cross-site.html
index c2a480a..f3eb187 100644
--- a/LayoutTests/http/tests/misc/form-submit-file-cross-site.html
+++ b/LayoutTests/http/tests/misc/form-submit-file-cross-site.html
@@ -34,7 +34,7 @@
</script>
</head>
<body>
-<form enctype="multipart/form-data" method="POST" action="http://localhost:8000/misc/resources/check-test-file.php">
+<form enctype="multipart/form-data" method="POST" action="http://localhost:8000/misc/resources/check-test-file.py">
<input name="data" type="file"></input>
</form>
</body>
diff --git a/LayoutTests/http/tests/misc/image-checks-for-accept.html b/LayoutTests/http/tests/misc/image-checks-for-accept.html
index 356999e..6d5f63d 100644
--- a/LayoutTests/http/tests/misc/image-checks-for-accept.html
+++ b/LayoutTests/http/tests/misc/image-checks-for-accept.html
@@ -23,7 +23,7 @@
<body>
Tests that a subresource is loaded if the server expects an Accept
header to provide it.<br>
-<img id="testImage" src="resources/image-checks-for-accept.php" onload="test()" onerror="test()"/>
+<img id="testImage" src="resources/image-checks-for-accept.py" onload="test()" onerror="test()"/>
<div id="result"/>
</body>
</html>
diff --git a/LayoutTests/http/tests/misc/image-error.html b/LayoutTests/http/tests/misc/image-error.html
index 3fbeb33..68c0f0b 100644
--- a/LayoutTests/http/tests/misc/image-error.html
+++ b/LayoutTests/http/tests/misc/image-error.html
@@ -14,6 +14,6 @@
<div id="target">
This test is making sure that even though the image returns a 404, it still gets loaded and displayed. This is done for legacy compat reasons,
and is the opposite of how the object element behaves.<br>
- <img id="result" src="resources/404image.php" onload="finished()" onerror="finished()">
+ <img id="result" src="resources/404image.py" onload="finished()" onerror="finished()">
</div>
<div id="console"></div>
diff --git a/LayoutTests/http/tests/misc/image-input-type-outlives-gc-without-crashing.html b/LayoutTests/http/tests/misc/image-input-type-outlives-gc-without-crashing.html
index 8dea6db..e558860 100644
--- a/LayoutTests/http/tests/misc/image-input-type-outlives-gc-without-crashing.html
+++ b/LayoutTests/http/tests/misc/image-input-type-outlives-gc-without-crashing.html
@@ -20,7 +20,7 @@
This test has a form with an input type=image element in it. The form is wrapped in a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.<br>
<div id="thediv">
<form>
-<input type="image" src="resources/slowimage.php">
+<input type="image" src="resources/slowimage.py">
</form>
</div>
</body>
diff --git a/LayoutTests/http/tests/misc/image-load-outlives-gc-without-crashing.html b/LayoutTests/http/tests/misc/image-load-outlives-gc-without-crashing.html
index d355f56..04770b5 100644
--- a/LayoutTests/http/tests/misc/image-load-outlives-gc-without-crashing.html
+++ b/LayoutTests/http/tests/misc/image-load-outlives-gc-without-crashing.html
@@ -19,7 +19,7 @@
This test has an image inside a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.<br>
<div id="thediv">
-<img src="resources/slowimage.php">
+<img src="resources/slowimage.py">
</div>
</body>
<script>
diff --git a/LayoutTests/http/tests/misc/javascript-url-stop-loaders.html b/LayoutTests/http/tests/misc/javascript-url-stop-loaders.html
index 9ce16ae..a2fb74c 100644
--- a/LayoutTests/http/tests/misc/javascript-url-stop-loaders.html
+++ b/LayoutTests/http/tests/misc/javascript-url-stop-loaders.html
@@ -3,7 +3,7 @@
<head>
<script src="/js-test-resources/js-test-pre.js"></script>
<script type="text/javascript">
-var str = "<script type='text/javascript' src='http://127.0.0.1:8000/misc/resources/hang-connection.php'><" + "/script>";
+var str = "<script type='text/javascript' src='http://127.0.0.1:8000/misc/resources/hang-connection.py'><" + "/script>";
function loadFirst()
{
diff --git a/LayoutTests/http/tests/misc/large-js-program.php b/LayoutTests/http/tests/misc/large-js-program.php
deleted file mode 100644
index 370a4ed..0000000
--- a/LayoutTests/http/tests/misc/large-js-program.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<html>
-<head>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-</script>
-</head>
-<body>
-<h1>This tests verifies that a large program doesn't crash JavaScript.</h1>
-<p>This test should generate an out of stack exception, but have no other output.
-<br>
-<pre id="console"></pre>
-<script src="/js-test-resources/js-test-pre.js"></script>
-<script>
-function print(m)
-{
- document.getElementById("console").innerHTML += m + "<br>";
-}
-
-function foo(o)
-{
- // We should not get to this code, we should throw an out of stack exception calling foo().
- testFailed("We should never get here!");
-}
-
-
-foo({"x": 1,
- "a": [
-<?php
-for ($i = 0; $i < 1000000; $i++) {
- if ($i != 0)
- echo ",\n";
- echo "[0, $i]";
-}
-?>
-]});
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/large-js-program.py b/LayoutTests/http/tests/misc/large-js-program.py
new file mode 100755
index 0000000..f23c0b0
--- /dev/null
+++ b/LayoutTests/http/tests/misc/large-js-program.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ '<head>\n'
+ '<script>\n'
+ 'if (window.testRunner)\n'
+ ' testRunner.dumpAsText();\n'
+ '</script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<h1>This tests verifies that a large program doesn't crash JavaScript.</h1>\n'
+ '<p>This test should generate an out of stack exception, but have no other output.\n'
+ '<br>\n'
+ '<pre id="console"></pre>\n'
+ '<script src="/js-test-resources/js-test-pre.js"></script>\n'
+ '<script>\n'
+ 'function print(m)\n'
+ '{\n'
+ ' document.getElementById("console").innerHTML += m + "<br>";\n'
+ '}\n\n'
+ 'function foo(o)\n'
+ '{\n'
+ ' // We should not get to this code, we should throw an out of stack exception calling foo().\n'
+ ' testFailed("We should never get here!");\n'
+ '}\n\n\n'
+ 'foo({"x": 1,\n'
+ ' "a": [\n'
+)
+
+for i in range(0, 1000000):
+ if i != 0:
+ sys.stdout.write(',\n')
+ sys.stdout.write('[0, {}]'.format(i))
+
+sys.stdout.write(
+ ']});\n'
+ '</script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/location-with-space.php b/LayoutTests/http/tests/misc/location-with-space.php
deleted file mode 100644
index 7ed6d65..0000000
--- a/LayoutTests/http/tests/misc/location-with-space.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('HTTP/1.0 302 Found');
- header('Location: resources/a success.html');
-?>
diff --git a/LayoutTests/http/tests/misc/location-with-space.py b/LayoutTests/http/tests/misc/location-with-space.py
new file mode 100755
index 0000000..81e7c15
--- /dev/null
+++ b/LayoutTests/http/tests/misc/location-with-space.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'status: 302\r\n'
+ 'Location: resources/a success.html\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/mask-image-accept.html b/LayoutTests/http/tests/misc/mask-image-accept.html
index 6215c78..da662e0 100644
--- a/LayoutTests/http/tests/misc/mask-image-accept.html
+++ b/LayoutTests/http/tests/misc/mask-image-accept.html
@@ -1,7 +1,7 @@
<html>
<head>
<style>
-#test { -webkit-mask-image: url(resources/image-checks-for-accept.php); width:100px; height:100px; background-color: green;}
+#test { -webkit-mask-image: url(resources/image-checks-for-accept.py); width:100px; height:100px; background-color: green;}
</style>
</head>
<body>
diff --git a/LayoutTests/http/tests/misc/object-image-error.html b/LayoutTests/http/tests/misc/object-image-error.html
index 1172c27..511435a 100644
--- a/LayoutTests/http/tests/misc/object-image-error.html
+++ b/LayoutTests/http/tests/misc/object-image-error.html
@@ -16,8 +16,8 @@
REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3</i>.
</p>
<div id="target" style="display: none;">
- <object type="image/jpeg" data="resources/404image.php" onerror="finished()">
+ <object type="image/jpeg" data="resources/404image.py" onerror="finished()">
PASS, no crash.
</object>
</div>
-<object type="image/jpeg" data="resources/404image.php" onerror="document.getElementById('target').style.display = ''"></object>
+<object type="image/jpeg" data="resources/404image.py" onerror="document.getElementById('target').style.display = ''"></object>
diff --git a/LayoutTests/http/tests/misc/object-image-load-outlives-gc-without-crashing.html b/LayoutTests/http/tests/misc/object-image-load-outlives-gc-without-crashing.html
index 096ed98..4185dfb 100644
--- a/LayoutTests/http/tests/misc/object-image-load-outlives-gc-without-crashing.html
+++ b/LayoutTests/http/tests/misc/object-image-load-outlives-gc-without-crashing.html
@@ -19,7 +19,7 @@
This has an object element representing an image. That object element is wrapped in a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.<br>
<div id="thediv">
-<object type="image/gif" data="resources/slowimage.php">
+<object type="image/gif" data="resources/slowimage.py">
</object>
</div>
</body>
diff --git a/LayoutTests/http/tests/misc/redirect-to-about-blank.html b/LayoutTests/http/tests/misc/redirect-to-about-blank.html
index 19d04d5..dd5a213 100644
--- a/LayoutTests/http/tests/misc/redirect-to-about-blank.html
+++ b/LayoutTests/http/tests/misc/redirect-to-about-blank.html
@@ -22,7 +22,7 @@
}
</script>
<body onload="runTest()">
-<iframe id="theFrame" src="resources/redirect-to-about-blank.php"></iframe>
+<iframe id="theFrame" src="resources/redirect-to-about-blank.py"></iframe>
<div>This tests that loading a main resource that redirects to about:blank does not cause a crash (and that the load is done correctly).
<div id="result"></div>
</html>
diff --git a/LayoutTests/http/tests/misc/redirect-to-external-url-expected.txt b/LayoutTests/http/tests/misc/redirect-to-external-url-expected.txt
index 872ebc4..68a1261 100644
--- a/LayoutTests/http/tests/misc/redirect-to-external-url-expected.txt
+++ b/LayoutTests/http/tests/misc/redirect-to-external-url-expected.txt
@@ -1,4 +1,4 @@
-Policy delegate: attempt to load http://127.0.0.1:8000/misc/resources/redirect-to-external-url.php with navigation type 'link clicked' originating from HTML > #document
+Policy delegate: attempt to load http://127.0.0.1:8000/misc/resources/redirect-to-external-url.py with navigation type 'link clicked' originating from HTML > #document
Policy delegate: attempt to load spaceballs://the-flamethrower/ with navigation type 'link clicked' originating from HTML > #document
Policy delegate: unable to implement policy with error domain 'WebKitErrorDomain', error code 101, in frame '<!--frame1-->'
This page has an iframe. It loads then navigates to an http url which redirects to an externally handled url.
diff --git a/LayoutTests/http/tests/misc/redirect-with-quotes.php b/LayoutTests/http/tests/misc/redirect-with-quotes.php
deleted file mode 100644
index 0283662..0000000
--- a/LayoutTests/http/tests/misc/redirect-with-quotes.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
- // Test for various syntaxes of Refresh header,
- // <http://bugzilla.opendarwin.org/show_bug.cgi?id=9854>.
-
- header('Content-type: text/html');
- header('Refresh: 0, URL = "resources/redirect-step2.php"');
-?>
-
-<body>
-<script>
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.dumpAsText();
- }
-</script>
-
-<p>FAILURE - should redirect (1)<p>
-</body>
diff --git a/LayoutTests/http/tests/misc/redirect-with-quotes.py b/LayoutTests/http/tests/misc/redirect-with-quotes.py
new file mode 100755
index 0000000..91cca33
--- /dev/null
+++ b/LayoutTests/http/tests/misc/redirect-with-quotes.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Refresh: 0, URL = "resources/redirect-step2.py"\r\n'
+ 'Content-Type: text/html\r\n\r\n\n'
+ '<body>\n'
+ '<script>\n'
+ ' if (window.testRunner) {\n'
+ ' testRunner.waitUntilDone();\n'
+ ' testRunner.dumpAsText();\n'
+ ' }\n'
+ '</script>\n'
+ ' \n'
+ '<p>FAILURE - should redirect (1)<p>\n'
+ '</body>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/redirect.php b/LayoutTests/http/tests/misc/redirect.php
deleted file mode 100644
index 7546946..0000000
--- a/LayoutTests/http/tests/misc/redirect.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('Location: resources/redirect-result.php');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/redirect.py b/LayoutTests/http/tests/misc/redirect.py
new file mode 100755
index 0000000..fdaff41
--- /dev/null
+++ b/LayoutTests/http/tests/misc/redirect.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: resources/redirect-result.py\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/referrer.html b/LayoutTests/http/tests/misc/referrer.html
index e4d7729..ef77956 100644
--- a/LayoutTests/http/tests/misc/referrer.html
+++ b/LayoutTests/http/tests/misc/referrer.html
@@ -4,5 +4,5 @@
testRunner.waitUntilDone();
}
-window.location = 'resources/referrer-result.php';
+window.location = 'resources/referrer-result.py';
</script>
diff --git a/LayoutTests/http/tests/misc/refresh-headers.php b/LayoutTests/http/tests/misc/refresh-headers.php
deleted file mode 100644
index 324e3dc..0000000
--- a/LayoutTests/http/tests/misc/refresh-headers.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
- $gotMaxAge=false;
- $gotNoCache=false;
-
- if (0 == strcasecmp($_SERVER["HTTP_CACHE_CONTROL"], "max-age=0"))
- {
- $gotMaxAge = true;
- }
-
- if ((0 == strcasecmp($_SERVER["HTTP_CACHE_CONTROL"], "no-cache")) ||
- (0 == strcasecmp($_SERVER["HTTP_PRAGMA"], "no-cache")))
- {
- $gotNoCache = true;
- }
-
- if ($gotNoCache) {
- echo '<p>Got a no-cache directive; FAILURE!</p>';
- echo '<script>if (window.testRunner) { testRunner.notifyDone(); }</script>';
- } else if ($gotMaxAge) {
- echo '<p>SUCCESS</p>';
- echo '<script>if (window.testRunner) { testRunner.notifyDone(); }</script>';
- } else {
- echo '<body onload="window.location.reload();">';
- echo '<p>No cache control headers, reloading...</p>';
- echo '<script>if (window.testRunner) { testRunner.waitUntilDone(); }</script>';
- echo '<script>function test() {window.location.reload();}</script>';
- }
-
- echo '<script>if (window.testRunner) { testRunner.dumpAsText(); }</script>';
- echo '<p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=5499">bug 5499</a>: Page reload does not send any cache control headers.</p>';
-?>
diff --git a/LayoutTests/http/tests/misc/refresh-headers.py b/LayoutTests/http/tests/misc/refresh-headers.py
new file mode 100755
index 0000000..11a1762
--- /dev/null
+++ b/LayoutTests/http/tests/misc/refresh-headers.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+cache_control = os.environ.get('HTTP_CACHE_CONTROL', '')
+pragma = os.environ.get('HTTP_PRAGMA', '')
+
+sys.stdout.write('Content-Type: text/html\r\n\r\n')
+
+if cache_control.lower() == 'no-cache' or pragma.lower() == 'no-cache':
+ sys.stdout.write(
+ '<p>Got a no-cache directive; FAILURE!</p>'
+ '<script>if (window.testRunner) { testRunner.notifyDone(); }</script>'
+ )
+elif cache_control.lower() == 'max-age=0':
+ sys.stdout.write(
+ '<p>SUCCESS</p>'
+ '<script>if (window.testRunner) { testRunner.notifyDone(); }</script>'
+ )
+else:
+ sys.stdout.write(
+ '<body onload="window.location.reload();">'
+ '<p>No cache control headers, reloading...</p>'
+ '<script>if (window.testRunner) { testRunner.waitUntilDone(); }</script>'
+ '<script>function test() {window.location.reload();}</script>'
+ )
+
+sys.stdout.write(
+ '<script>if (window.testRunner) { testRunner.dumpAsText(); }</script>'
+ '<p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=5499">bug 5499</a>: Page reload does not send any cache control headers.</p>'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.php b/LayoutTests/http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.php
deleted file mode 100644
index a9113aa..0000000
--- a/LayoutTests/http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-sleep(1);
-print "
-<html>
-<head>
- <script src='notfound.js'></script>
- <style>body { background-color: red; }</style>
-</head>
-<body>
- PASS.
- <script>
- if (window.testRunner) {
- testRunner.notifyDone();
- }
- </script>
-</body>
-</html>";
-?>
diff --git a/LayoutTests/http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.py b/LayoutTests/http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.py
new file mode 100755
index 0000000..7a335f4
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/3rd-level-iframe-with-blocking-resource.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+time.sleep(1)
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ '<head>\n'
+ ' <script src=\'notfound.js\'></script>\n'
+ ' <style>body { background-color: red; }</style>\n'
+ '</head>\n'
+ '<body>\n'
+ ' PASS.\n'
+ ' <script>\n'
+ ' if (window.testRunner) {\n'
+ ' testRunner.notifyDone();\n'
+ ' }\n'
+ ' </script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/404image.php b/LayoutTests/http/tests/misc/resources/404image.php
deleted file mode 100644
index 86f0726..0000000
--- a/LayoutTests/http/tests/misc/resources/404image.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?
-header("HTTP/1.1 404 Not Found");
-header("Content-Length: 38616");
-header("Content-Type: image/jpeg");
-header("Last-Modified: Thu, 01 Jun 2006 06:09:43 GMT");
-echo(file_get_contents("compass.jpg"));
-?>
diff --git a/LayoutTests/http/tests/misc/resources/404image.py b/LayoutTests/http/tests/misc/resources/404image.py
new file mode 100755
index 0000000..8ebfa77
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/404image.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+sys.stdout.write(
+ 'status: 404\r\n'
+ 'Content-Length: 38616\r\n'
+ 'Content-Type: image/jpeg\r\n'
+ 'Last-Modified: Thu, 01 Jun 2006 06:09:43 GMT\r\n\r\n'
+)
+
+sys.stdout.flush()
+
+with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass.jpg'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/SVGFont-delayed-loader.svg b/LayoutTests/http/tests/misc/resources/SVGFont-delayed-loader.svg
index 9e600d9..257c319 100644
--- a/LayoutTests/http/tests/misc/resources/SVGFont-delayed-loader.svg
+++ b/LayoutTests/http/tests/misc/resources/SVGFont-delayed-loader.svg
@@ -9,7 +9,7 @@
<defs>
<font-face font-family="name">
<font-face-src>
- <font-face-uri xlink:href="http://127.0.0.1:8000/misc/resources/hang-connection.php"/>
+ <font-face-uri xlink:href="http://127.0.0.1:8000/misc/resources/hang-connection.py"/>
</font-face-src>
</font-face>
</defs>
diff --git a/LayoutTests/http/tests/misc/resources/bad-charset-alias.php b/LayoutTests/http/tests/misc/resources/bad-charset-alias.php
deleted file mode 100644
index 6f08908..0000000
--- a/LayoutTests/http/tests/misc/resources/bad-charset-alias.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-echo '<meta charset="' . $_GET['charset'] . '">';
-echo '<body onload="top.frameLoaded()">';
-echo '<p id=charset>' . $_GET['charset'] . '</p>';
-echo '<p id=test>SUóóåSS</p>'; // "óóå" are Cyrillic characters that look like "CCE".
-echo '</body>';
-?>
diff --git a/LayoutTests/http/tests/misc/resources/bad-charset-alias.py b/LayoutTests/http/tests/misc/resources/bad-charset-alias.py
new file mode 100755
index 0000000..6613f8d
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/bad-charset-alias.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+from urllib.parse import parse_qs
+
+charset = query = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('charset', [''])[0]
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=utf-8\r\n\r\n'
+ '<meta charset="{charset}">\n'
+ '<body onload="top.frameLoaded()">\n'
+ '<p id=charset>{charset}</p>\n'
+ '<p id=test>{text}</p>\n'
+ '</body>\n'.format(charset=charset, text='SUóóåSS'.encode('ISO-8859-1').decode('KOI8-R'))
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/basic-echo-post.php b/LayoutTests/http/tests/misc/resources/basic-echo-post.php
deleted file mode 100644
index 01047d9..0000000
--- a/LayoutTests/http/tests/misc/resources/basic-echo-post.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-header("Cache-Control: no-store");
-header("Connection: close");
-if (!isset($_SERVER['PHP_AUTH_USER'])
- || !isset($_SERVER['PHP_AUTH_PW'])) {
- header("WWW-Authenticate: Basic realm=\"TestRealm\"");
- header('HTTP/1.0 401 Unauthorized');
- echo "Please send a username and password";
- exit;
-}
-
-$myfile = fopen($_FILES["data"]["tmp_name"], "r") or die("Unable to open file!");
-echo "Uploaded blob data: ";
-echo fread($myfile,$_FILES["data"]["size"]);
-fclose($myfile);
-?>
diff --git a/LayoutTests/http/tests/misc/resources/basic-echo-post.py b/LayoutTests/http/tests/misc/resources/basic-echo-post.py
new file mode 100755
index 0000000..637b40a
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/basic-echo-post.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+import base64
+import cgi
+import os
+import sys
+
+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')
+username = credentials[0]
+password = ':'.join(credentials[1:])
+
+sys.stdout.write(
+ 'Cache-Control: no-store\r\n'
+ 'Connection: close\r\n'
+ 'Content-Type: text/html\r\n'
+)
+
+if not username or not password:
+ sys.stdout.write(
+ 'WWW-Authenticate: Basic realm=\"TestRealm\"\r\n'
+ 'status: 401\r\n\r\n'
+ 'Please send a username and password'
+ )
+else:
+ form = cgi.FieldStorage()
+ sys.stdout.write(
+ '\r\n'
+ 'Uploaded blob data: {}'.format(str(form.getvalue('data'), 'utf-8'))
+ )
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/bocu-1-cyrillic.php b/LayoutTests/http/tests/misc/resources/bocu-1-cyrillic.php
deleted file mode 100644
index 8c84ffcb..0000000
--- a/LayoutTests/http/tests/misc/resources/bocu-1-cyrillic.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-header('Content-Type: text/html; charset=BOCU-1');
-?>
-ÓÓ
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/bocu-1-cyrillic.py b/LayoutTests/http/tests/misc/resources/bocu-1-cyrillic.py
new file mode 100755
index 0000000..eeb4f56
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/bocu-1-cyrillic.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=BOCU-1\r\n\r\n'
+ 'žŠÓÓ“Šˆ'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/char-encoding-in-hidden-charset-field.php b/LayoutTests/http/tests/misc/resources/char-encoding-in-hidden-charset-field.php
deleted file mode 100644
index 47b85a2..0000000
--- a/LayoutTests/http/tests/misc/resources/char-encoding-in-hidden-charset-field.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-header("Content-type: text/html; charset=UTF-8");
-?>
-<html>
-<head>
-<title>Test for bug 19079</title>
-</head>
-<body>
-<p>
-This is a test for https://bugs.webkit.org/show_bug.cgi?id=19079, it send the submissions
-character encoding in hidden _charset_ field.
-</p>
-
-<?php
-if ($_SERVER['REQUEST_METHOD'] == 'POST') {
-$data = file_get_contents("php://input");
-if ($data != "")
-echo "<p>PASSED: $data </p>";
-else
-echo "<p>PASSED: No _charset_ field </p>";
-}
-if ($_SERVER['REQUEST_METHOD'] == 'GET') {
-$data = htmlentities($_GET['_charset_']);
-echo "<p>PASSED: $data </p>";
-}
-?>
-
-<script>
-if(window.testRunner)
- testRunner.notifyDone();
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/char-encoding-in-hidden-charset-field.py b/LayoutTests/http/tests/misc/resources/char-encoding-in-hidden-charset-field.py
new file mode 100755
index 0000000..929b3ad
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/char-encoding-in-hidden-charset-field.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+from urllib.parse import parse_qs
+
+request_method = os.environ.get('REQUEST_METHOD', '')
+charset = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('_charset_', [''])[0]
+
+data = ''
+if request_method == 'POST':
+ data = ''.join(sys.stdin.readlines())
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=UTF-8\r\n\r\n'
+ '<html>\n'
+ '<head>\n'
+ '<title>Test for bug 19079</title>\n'
+ '</head>\n'
+ '<body>\n'
+ '<p>\n'
+ 'This is a test for https://bugs.webkit.org/show_bug.cgi?id=19079, it send the submissions\n'
+ 'character encoding in hidden _charset_ field.\n'
+ '</p>\n'
+)
+
+if request_method == 'POST':
+ if data:
+ sys.stdout.write('<p>PASSED: {} </p>'.format(data))
+ else:
+ sys.stdout.write('<p>PASSED: No _charset_ field </p>')
+
+if request_method == 'GET':
+ sys.stdout.write('<p>PASSED: {} </p>'.format(charset))
+
+sys.stdout.write(
+ '<script>\n'
+ 'if(window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ '</script>\n'
+ '\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.php b/LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.php
deleted file mode 100644
index cec16e7..0000000
--- a/LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
-header("Cache-Control: no-cache, no-store, must-revalidate");
-header("Pragma: no-cache");
-header("Content-Type: text/html");
-
-echo "<html><script>parent.firstScript();</script>\n";
-
-// Dump a lot of text to exceed 1024 chars after finishing the head section.
-echo "<body>\n";
-for ($i = 0; $i < 10000; ++$i)
- echo "a";
-
-// Send off the first portion so it executes before the rest is received.
-ob_flush();
-flush();
-sleep(1);
-
-echo "<html><script>parent.secondScript();</script>\n";
-echo "</body></html>\n";
-?>
diff --git a/LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.py b/LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.py
new file mode 100755
index 0000000..47750c8
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+sys.stdout.write(
+ 'Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n'
+ 'Cache-Control: no-cache, no-store, must-revalidate\r\n'
+ 'Pragma: no-cache\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ '<html><script>parent.firstScript();</script>\n'
+ '<body>\n'
+)
+
+for _ in range(0, 10000):
+ sys.stdout.write('a')
+
+sys.stdout.flush()
+time.sleep(1)
+
+sys.stdout.write(
+ '<html><script>parent.secondScript();</script>\n'
+ '</body></html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/check-keygen-post.php b/LayoutTests/http/tests/misc/resources/check-keygen-post.php
deleted file mode 100644
index 33f5353..0000000
--- a/LayoutTests/http/tests/misc/resources/check-keygen-post.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-header("Content-Type: text/html; charset=UTF-8");
-?>
-<html><!-- webkit-test-runner [ KeygenElementEnabled=true ] -->
-<head>
-<script>
-
-function runTest()
-{
- var r = document.getElementById('result');
- var o = document.getElementById('output').firstChild;
- if (o.nodeValue == 'MIHFMHEwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAnX0TILJrOMUue%2BPtwBRE6XfV%0AWtKQbsshxk5ZhcUwcwyvcnIq9b82QhJdoACdD34rqfCAIND46fXKQUnb0mvKzQID%0AAQABFhFNb3ppbGxhSXNNeUZyaWVuZDANBgkqhkiG9w0BAQQFAANBAAKv2Eex2n%2FS%0Ar%2F7iJNroWlSzSMtTiQTEB%2BADWHGj9u1xrUrOilq%2Fo2cuQxIfZcNZkYAkWP4DubqW%0Ai0%2F%2FrgBvmco%3D')
- r.innerHTML = "SUCCESS: keygen was parsed correctly";
- else
- r.innerHTML = "FAILURE: keygen was not parsed correctly. value=" +
- o.nodeValue;
-
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-</script>
-</head>
-<body onload="runTest()">
-<p>
-This is a regression test for keygen tag POST processing: https://bugs.webkit.org/show_bug.cgi?id=70617.
-</p>
-<div style='display: none;' id='output'><?php
-if (array_key_exists('spkac', $_REQUEST)) {
- echo $_REQUEST['spkac'];
-} else {
- echo "spkac does not exist";
-}
-?>
-</div>
-<div id="result"></div>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/check-keygen-post.py b/LayoutTests/http/tests/misc/resources/check-keygen-post.py
new file mode 100755
index 0000000..83e7b9a
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/check-keygen-post.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python3
+
+import cgi
+import os
+import sys
+from urllib.parse import parse_qs
+
+method = os.environ.get('REQUEST_METHOD', '')
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=UTF-8\r\n\r\n'
+ '<html><!-- webkit-test-runner [ KeygenElementEnabled=true ] -->\n'
+ '<head>\n'
+ '<script>\n'
+ '\n'
+ 'function runTest()\n'
+ '{\n'
+ ' var r = document.getElementById(\'result\');\n'
+ ' var o = document.getElementById(\'output\').firstChild;\n'
+ ' if (o.nodeValue == \'MIHFMHEwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAnX0TILJrOMUue%2BPtwBRE6XfV%0AWtKQbsshxk5ZhcUwcwyvcnIq9b82QhJdoACdD34rqfCAIND46fXKQUnb0mvKzQID%0AAQABFhFNb3ppbGxhSXNNeUZyaWVuZDANBgkqhkiG9w0BAQQFAANBAAKv2Eex2n%2FS%0Ar%2F7iJNroWlSzSMtTiQTEB%2BADWHGj9u1xrUrOilq%2Fo2cuQxIfZcNZkYAkWP4DubqW%0Ai0%2F%2FrgBvmco%3D\')\n'
+ ' r.innerHTML = "SUCCESS: keygen was parsed correctly";\n'
+ ' else\n'
+ ' r.innerHTML = "FAILURE: keygen was not parsed correctly. value=" +\n'
+ ' o.nodeValue;\n'
+ ' \n'
+ ' if (window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ '}\n'
+ '\n'
+ '</script>\n'
+ '</head>\n'
+ '<body onload="runTest()">\n'
+ '<p>\n'
+ 'This is a regression test for keygen tag POST processing: https://bugs.webkit.org/show_bug.cgi?id=70617.\n'
+ '</p>\n'
+ '<div style=\'display: none;\' id=\'output\'>'
+)
+
+request = {}
+if method == 'POST':
+ form = cgi.FieldStorage()
+ for key in form.keys():
+ request[key] = form.getvalue(key)
+else:
+ query = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True)
+ for key in query.keys():
+ request[key] = query[key]
+
+if 'HTTP_COOKIE' in os.environ:
+ header_cookies = os.environ['HTTP_COOKIE']
+ header_cookies = header_cookies.split('; ')
+
+ for cookie in header_cookies:
+ cookie = cookie.split('=')
+ request[cookie[0]] = cookie[1]
+
+if 'spkac' in request.keys():
+ sys.stdout.write('{}'.format(request['spkac']))
+else:
+ sys.stdout.write('spkac does not exist')
+
+sys.stdout.write(
+ '</div>\n'
+ '<div id="result"></div>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/check-test-file.php b/LayoutTests/http/tests/misc/resources/check-test-file.php
deleted file mode 100644
index cd952ee..0000000
--- a/LayoutTests/http/tests/misc/resources/check-test-file.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-header("Content-Type: text/html; charset=UTF-8");
-?>
-<html>
-<head>
-<script>
-onload = function() {
- if (window.testRunner)
- testRunner.notifyDone();
-}
-</script>
-</head>
-<body>
-<h1>This tests verifies the test file included in the multipart form data:</h1>
-<pre>
-<?php
-if (isset($_FILES['data'])) {
- print "PASS: File is present\n";
- if ($_FILES['data']['error'] == UPLOAD_ERR_OK)
- print "PASS: File upload was successful\n";
- else
- print "FAIL: File upload failed\n";
-
- if ($_FILES['data']['size'] > 0)
- print "PASS: File size is greater than 0\n";
- else
- print "FAIL: File size is 0\n";
-} else {
- print "FAIL: File is missing";
-}
-?>
-</pre>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/check-test-file.py b/LayoutTests/http/tests/misc/resources/check-test-file.py
new file mode 100755
index 0000000..931d897
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/check-test-file.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+
+import cgi
+import sys
+
+form = cgi.FieldStorage()
+data = form.getvalue('data')
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=UTF-8\r\n\r\n'
+ '<html>\n'
+ '<head>\n'
+ '<script>\n'
+ 'onload = function() {\n'
+ ' if (window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ '}\n'
+ '</script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<h1>This tests verifies the test file included in the multipart form data:</h1>\n'
+ '<pre>\n'
+)
+
+if data:
+ sys.stdout.write(
+ 'PASS: File is present\n'
+ 'PASS: File upload was successful\n'
+ )
+
+ if len(data) > 0:
+ print('PASS: File size is greater than 0')
+ else:
+ print('FAIL: File size is 0')
+else:
+ sys.stdout.write(
+ 'FAIL: File is missing\n'
+ )
+
+sys.stdout.write(
+ '</pre>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.php b/LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.php
deleted file mode 100644
index c9344899..0000000
--- a/LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-header("Content-Type: text/html; charset=UTF-8");
-?>
-<html>
-<head>
-<script>
- if (window.testRunner)
- testRunner.notifyDone();
-</script>
-</head>
-<body>
-<h1>This tests verifies that files without a name are included in the multipart form data:</h1>
-<pre>
-<?php
-if (isset($_FILES['data'])) {
- print "Test passed.";
-} else {
- print "Test failed.";
-}
-?>
-</pre>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.py b/LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.py
new file mode 100755
index 0000000..e622c3a
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+
+import cgi
+import sys
+
+form = cgi.FieldStorage()
+data = form.getvalue('data')
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=UTF-8\r\n\r\n'
+ '<html>\n'
+ '<head>\n'
+ '<script>\n'
+ ' if (window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ '</script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<h1>This tests verifies that files without a name are included in the multipart form data:</h1>\n'
+ '<pre>\n'
+)
+
+if data is not None:
+ sys.stdout.write('Test passed.')
+else:
+ sys.stdout.write('Test failed.')
+
+sys.stdout.write(
+ '</pre>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/delayed-log.php b/LayoutTests/http/tests/misc/resources/delayed-log.php
deleted file mode 100644
index 2c68e2d..0000000
--- a/LayoutTests/http/tests/misc/resources/delayed-log.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
- header("Content-Type: text/javascript");
- sleep($_GET["delay"]);
- echo "log('" . $_GET["msg"] . "');\n";
- if ($_GET["done"] == "1") {
- echo "if (window.testRunner)\n";
- echo " testRunner.notifyDone();\n";
- }
-?>
diff --git a/LayoutTests/http/tests/misc/resources/delayed-log.py b/LayoutTests/http/tests/misc/resources/delayed-log.py
new file mode 100755
index 0000000..6ef8f51
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/delayed-log.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+import time
+from urllib.parse import parse_qs
+
+query = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True)
+delay = int(query.get('delay', [0])[0])
+msg = query.get('msg', [''])[0]
+done = query.get('done', [''])[0]
+
+sys.stdout.write('Content-Type: text/javascript\r\n\r\n')
+time.sleep(delay)
+sys.stdout.write('log(\'{}\');\n'.format(msg))
+if done == '1':
+ sys.stdout.write(
+ 'if (window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ )
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/dns-prefetch-control.php b/LayoutTests/http/tests/misc/resources/dns-prefetch-control.php
deleted file mode 100644
index 93544c5..0000000
--- a/LayoutTests/http/tests/misc/resources/dns-prefetch-control.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
- if ($_GET['value'] == 'off')
- header('X-DNS-Prefetch-Control: off');
- else if ($_GET['value'] == 'on')
- header('X-DNS-Prefetch-Control: on');
- else if ($_GET['value'] == 'foo')
- header('X-DNS-Prefetch-Control: foo');
-
-$fake_domain = "www." . rand() . ".invalid";
-?>
-<html>
-<body>
-<a href='http://<?php echo $fake_domain ?>/'><?php echo $fake_domain ?></a>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/dns-prefetch-control.py b/LayoutTests/http/tests/misc/resources/dns-prefetch-control.py
new file mode 100755
index 0000000..2280694
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/dns-prefetch-control.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+import os
+import random
+import sys
+from urllib.parse import parse_qs
+
+value = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('value', [''])[0]
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if value in ['off', 'on', 'foo']:
+ sys.stdout.write('X-DNS-Prefetch-Control: {}\r\n\r\n'.format(value))
+else:
+ sys.stdout.write('\r\n')
+
+fake_domain = 'www.{}.invalid'.format(random.randint(0, 32768))
+sys.stdout.write(
+ '<html>\n'
+ '<body>\n'
+ '<a href=\'http://{domain}/\'>{domain}</a>\n'
+ '</body>\n'
+ '</html>\n'.format(fake_domain)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/echo-query-param.php b/LayoutTests/http/tests/misc/resources/echo-query-param.php
deleted file mode 100644
index c117e5d..0000000
--- a/LayoutTests/http/tests/misc/resources/echo-query-param.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-header("Content-Type: text/html; charset=UTF-8");
-echo "<html><body><div id='output'>";
-echo $_GET{'q'};
-echo "</div></body></html>";
-?>
diff --git a/LayoutTests/http/tests/misc/resources/echo-query-param.py b/LayoutTests/http/tests/misc/resources/echo-query-param.py
new file mode 100755
index 0000000..0272e69
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/echo-query-param.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+from urllib.parse import parse_qs
+
+q = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('q', [''])[0]
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=UTF-8\r\n\r\n'
+ '<html><body><div id=\'output\'>'
+ '{}'
+ '</div></body></html>'.format(q)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/form-post-textplain.php b/LayoutTests/http/tests/misc/resources/form-post-textplain.php
deleted file mode 100644
index 153db01..0000000
--- a/LayoutTests/http/tests/misc/resources/form-post-textplain.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-header("Content-type: text/html; charset=UTF-8");
-?>
-<html>
-<body>
-<p>
-This test makes sure that forms POSTed with a content-type of text/plain actually send data in text/plain
-</p>
-<?php
-
-$content_type = $_SERVER["CONTENT_TYPE"];
-
-if ($content_type == "text/plain") {
- echo "<p>SUCCESS: Content-type is text/plain.</p>";
-} else {
- echo "<p>FAIL: Content-type should be text/plain, but was '$content_type'</p>";
-}
-
-$data = file_get_contents("php://input");
-
-if($data == "f1=This is field #1 &!@$%\r\n='<>\r\nf2=This is field #2 \"\"") {
- echo "<p>SUCCESS</p>";
-} else {
- echo "<p>FAILURE: $data</p>";
-}
-?>
-<script>
-if(window.testRunner)
- testRunner.notifyDone();
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/form-post-textplain.py b/LayoutTests/http/tests/misc/resources/form-post-textplain.py
new file mode 100755
index 0000000..04b4d55
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/form-post-textplain.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+content_type = os.environ.get('CONTENT_TYPE', '')
+data = ''.join(sys.stdin.readlines())
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=UTF-8\r\n\r\n'
+ '<html>\n'
+ '<body>\n'
+ '<p>\n'
+ 'This test makes sure that forms POSTed with a content-type of text/plain actually send data in text/plain\n'
+ '</p>\n'
+)
+
+if content_type == 'text/plain':
+ sys.stdout.write('<p>SUCCESS: Content-type is text/plain.</p>')
+else:
+ sys.stdout.write('<p>FAIL: Content-type should be text/plain, but was \'{}\'</p>'.format(content_type))
+
+if data == 'f1=This is field #1 &!@$%\r\n=\'<>\r\nf2=This is field #2 ""':
+ sys.stdout.write('<p>SUCCESS</p>')
+else:
+ sys.stdout.write('<p>FAILURE: {}</p>'.format(data))
+
+sys.stdout.write(
+ '<script>\n'
+ 'if(window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ '</script>\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/hang-connection.php b/LayoutTests/http/tests/misc/resources/hang-connection.php
deleted file mode 100644
index 97524b1..0000000
--- a/LayoutTests/http/tests/misc/resources/hang-connection.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-while (true) {
- echo "a";
- flush();
- usleep(100000);
-}
-?>
diff --git a/LayoutTests/http/tests/misc/resources/hang-connection.py b/LayoutTests/http/tests/misc/resources/hang-connection.py
new file mode 100755
index 0000000..5425283
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/hang-connection.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+sys.stdout.write('Content-Type: text/html\r\n\r\n')
+
+while True:
+ sys.stdout.write('a')
+ sys.stdout.flush()
+ time.sleep(0.1)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/image-checks-for-accept.php b/LayoutTests/http/tests/misc/resources/image-checks-for-accept.php
deleted file mode 100644
index fcd0fa3..0000000
--- a/LayoutTests/http/tests/misc/resources/image-checks-for-accept.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
- $allimages = 'image/*';
- $pos = strpos($_SERVER["HTTP_ACCEPT"], $allimages);
- if ($pos !== false)
- {
- header("Content-Type: image/jpg");
- header("Cache-Control: no-store");
- header("Connection: close");
-
- $fn = fopen("compass.jpg", "r");
- fpassthru($fn);
- fclose($fn);
- exit;
- }
-?>
diff --git a/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py b/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py
new file mode 100755
index 0000000..fe0fb16
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/image-checks-for-accept.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+http_accept = os.environ.get('HTTP_ACCEPT', '')
+
+if 'image/*' in http_accept:
+ sys.stdout.write(
+ 'Content-Type: image/jpg\r\n'
+ 'Cache-Control: no-store\r\n'
+ 'Connection: close\r\n\r\n'
+ )
+
+ sys.stdout.flush()
+ with open(os.path.join('/'.join(__file__.split('/')[0:-1]), 'compass.jpg'), 'rb') as fn:
+ sys.stdout.buffer.write(fn.read())
+else:
+ sys.stdout.write('Content-Type: text/html\r\n\r\n')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/nested-iframe-loading-another-iframe.html b/LayoutTests/http/tests/misc/resources/nested-iframe-loading-another-iframe.html
index 729df93..0d0664d 100644
--- a/LayoutTests/http/tests/misc/resources/nested-iframe-loading-another-iframe.html
+++ b/LayoutTests/http/tests/misc/resources/nested-iframe-loading-another-iframe.html
@@ -6,6 +6,6 @@
<div>
<p>Load another level of nested iframe.</p>
</div>
- <iframe src="3rd-level-iframe-with-blocking-resource.php"></iframe>
+ <iframe src="3rd-level-iframe-with-blocking-resource.py"></iframe>
</body>
</html>
diff --git a/LayoutTests/http/tests/misc/resources/protected/protected-image.php b/LayoutTests/http/tests/misc/resources/protected/protected-image.php
deleted file mode 100644
index a49ee52..0000000
--- a/LayoutTests/http/tests/misc/resources/protected/protected-image.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-header("Cache-Control: no-store");
-header("Connection: close");
-if (!isset($_SERVER["PHP_AUTH_USER"])) {
- header("WWW-authenticate: Basic realm=\"" . $_SERVER["REQUEST_URI"] . "\"");
- header("HTTP/1.0 401 Unauthorized");
- exit;
-}
-// Authenticated
-header("Content-Type: image/png");
-echo file_get_contents("../../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png");
-?>
diff --git a/LayoutTests/http/tests/misc/resources/protected/protected-image.py b/LayoutTests/http/tests/misc/resources/protected/protected-image.py
new file mode 100755
index 0000000..5135bbd
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/protected/protected-image.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+import base64
+import os
+import sys
+
+uri = os.environ.get('REQUEST_URI', '')
+usrname = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':')[0]
+
+sys.stdout.write(
+ 'Cache-Control: no-store\r\n'
+ 'Connection: close\r\n'
+)
+
+if not username:
+ sys.stdout.write(
+ 'WWW-authenticate: Basic realm="{}"\r\n'
+ 'status: 401\r\n\r\n'.format(uri)
+ )
+else:
+ with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file:
+ sys.stdout.buffer.write(file.read())
+ sys.stdout.write('Content-Type: image/png\r\n\r\n')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/random-no-store.php b/LayoutTests/http/tests/misc/resources/random-no-store.php
deleted file mode 100644
index 4b24786..0000000
--- a/LayoutTests/http/tests/misc/resources/random-no-store.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
- header("Cache-Control: no-store");
-?>
-var p = document.createElement("p");
-p.appendChild(document.createTextNode("<?php
- print rand();
-?>
-"));
-document.body.appendChild(p);
diff --git a/LayoutTests/http/tests/misc/resources/random-no-store.py b/LayoutTests/http/tests/misc/resources/random-no-store.py
new file mode 100755
index 0000000..0996186
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/random-no-store.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+import random
+import sys
+
+sys.stdout.write(
+ 'Cache-Control: no-store\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ 'var p = document.createElement("p");\n'
+ 'p.appendChild(document.createTextNode("{}"));\n'
+ 'document.body.appendChild(p);\n'.format(random.randint(0, 32767))
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/redirect-result.php b/LayoutTests/http/tests/misc/resources/redirect-result.php
deleted file mode 100644
index d2d8520..0000000
--- a/LayoutTests/http/tests/misc/resources/redirect-result.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<body>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-var userAgent = "<?php echo $_SERVER['HTTP_USER_AGENT']; ?>";
-if (userAgent.match(/WebKit/)) {
- document.write("PASS: User-Agent header contains the string 'WebKit'.");
-} else {
- document.write("FAIL: User-Agent header does not contain the string 'WebKit', value is '" + userAgent + "'");
-}
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-result.py b/LayoutTests/http/tests/misc/resources/redirect-result.py
new file mode 100755
index 0000000..5053682
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/redirect-result.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+user_agent = os.environ.get('HTTP_USER_AGENT', '')
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ '<body>\n'
+ '<script>\n'
+ 'if (window.testRunner)\n'
+ ' testRunner.dumpAsText();\n'
+ '\n'
+ 'var userAgent = "{}";\n'
+ 'if (userAgent.match(/WebKit/)) {{\n'
+ ' document.write("PASS: User-Agent header contains the string \'WebKit\'.");\n'
+ '}} else {{\n'
+ ' document.write("FAIL: User-Agent header does not contain the string \'WebKit\', value is \'" + userAgent + "\'");\n'
+ '}}\n'
+ '</script>\n'
+ '\n'
+ '</body>\n'
+ '</html>\n'.format(user_agent)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/redirect-step2.php b/LayoutTests/http/tests/misc/resources/redirect-step2.php
deleted file mode 100644
index 2713b44..0000000
--- a/LayoutTests/http/tests/misc/resources/redirect-step2.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
- // Test for various syntaxes of Refresh header,
- // <http://bugzilla.opendarwin.org/show_bug.cgi?id=9854>.
-
- header('Content-type: text/html');
- header('Refresh: 0 ; url= \'redirect-step3.php\' ');
-?>
-
-<p>FAILURE - should redirect (2)<p>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-step2.py b/LayoutTests/http/tests/misc/resources/redirect-step2.py
new file mode 100755
index 0000000..604d7f6
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/redirect-step2.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Refresh: 0 ; url= \'redirect-step3.py\' \r\n'
+ 'Content-Type: text/html\r\n\r\n\n'
+ '<p>FAILURE - should redirect (2)<p>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/redirect-step3.php b/LayoutTests/http/tests/misc/resources/redirect-step3.php
deleted file mode 100644
index ec0a016..0000000
--- a/LayoutTests/http/tests/misc/resources/redirect-step3.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
- // Test for various syntaxes of Refresh header,
- // <http://bugzilla.opendarwin.org/show_bug.cgi?id=9854>.
-
- header('Content-type: text/html');
-?>
-<head>
- <meta http-equiv="Refresh" content=" 0, 'redirect-step4.php' ">
-</head>
-
-<p>FAILURE - should redirect (3)<p>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-step3.py b/LayoutTests/http/tests/misc/resources/redirect-step3.py
new file mode 100755
index 0000000..228039a
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/redirect-step3.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<head>\n'
+ ' <meta http-equiv="Refresh" content=" 0, \'redirect-step4.py\' ">\n'
+ '</head>\n'
+ '\n'
+ '<p>FAILURE - should redirect (3)<p>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/redirect-step4.php b/LayoutTests/http/tests/misc/resources/redirect-step4.php
deleted file mode 100644
index 8249213..0000000
--- a/LayoutTests/http/tests/misc/resources/redirect-step4.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
- // Test for various syntaxes of Refresh header,
- // <http://bugzilla.opendarwin.org/show_bug.cgi?id=9854>.
-
- header('Content-type: text/html');
-?>
-<head>
- <meta http-equiv="Refresh" content=' 0 ; 200.html '>
-</head>
-
-<p>FAILURE - should redirect (4)<p>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-step4.py b/LayoutTests/http/tests/misc/resources/redirect-step4.py
new file mode 100755
index 0000000..299f1df
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/redirect-step4.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<head>\n'
+ ' <meta http-equiv="Refresh" content=\' 0 ; 200.html \'>\n'
+ '</head>\n'
+ '\n'
+ '<p>FAILURE - should redirect (4)<p>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/redirect-to-about-blank.php b/LayoutTests/http/tests/misc/resources/redirect-to-about-blank.php
deleted file mode 100644
index 936ce35..0000000
--- a/LayoutTests/http/tests/misc/resources/redirect-to-about-blank.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('Location: about:blank');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-to-about-blank.py b/LayoutTests/http/tests/misc/resources/redirect-to-about-blank.py
new file mode 100755
index 0000000..a9303f5
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/redirect-to-about-blank.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: about:blank\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/redirect-to-external-url-iframe.html b/LayoutTests/http/tests/misc/resources/redirect-to-external-url-iframe.html
index 8e9d3cb..b77a95f 100644
--- a/LayoutTests/http/tests/misc/resources/redirect-to-external-url-iframe.html
+++ b/LayoutTests/http/tests/misc/resources/redirect-to-external-url-iframe.html
@@ -21,6 +21,6 @@
<body onload="runTest();">
This is a page with a link in it. When the link it clicked it will navigate to another page. That page redirects to an externally handled URL.<br>
The policy delegate should be asked about the initial navigation and the redirect.<br>
-<a id="testlink" href="redirect-to-external-url.php">The kids love this one</a>
+<a id="testlink" href="redirect-to-external-url.py">The kids love this one</a>
</body>
</html>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-to-external-url.php b/LayoutTests/http/tests/misc/resources/redirect-to-external-url.php
deleted file mode 100644
index 7925b80a..0000000
--- a/LayoutTests/http/tests/misc/resources/redirect-to-external-url.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('Location: spaceballs://the-flamethrower/');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/resources/redirect-to-external-url.py b/LayoutTests/http/tests/misc/resources/redirect-to-external-url.py
new file mode 100755
index 0000000..3bb0d95
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/redirect-to-external-url.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: spaceballs://the-flamethrower/\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/referrer-main-resource.php b/LayoutTests/http/tests/misc/resources/referrer-main-resource.php
deleted file mode 100644
index b146d3d..0000000
--- a/LayoutTests/http/tests/misc/resources/referrer-main-resource.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<html>
-<head>
-<script>
-function runTest() {
-
- if (window.testRunner)
- testRunner.dumpAsText();
-
- <?php if (isset($_SERVER['HTTP_REFERER']))
- echo 'document.write("FAIL: The server should not receive a referrer which is not set by user agent.");';
- else
- echo 'document.write("PASS: The server didn\'t receive a referrer.");';
- ?>;
-
-}
-</script>
-</head>
-<body onload="runTest()">
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/referrer-main-resource.py b/LayoutTests/http/tests/misc/resources/referrer-main-resource.py
new file mode 100755
index 0000000..5c3fbbf
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/referrer-main-resource.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ '<head>\n'
+ '<script>\n'
+ 'function runTest() {\n\n'
+ ' if (window.testRunner)\n'
+ ' testRunner.dumpAsText();\n\n'
+)
+
+if os.environ.get('HTTP_REFERER'):
+ sys.stdout.write('document.write("FAIL: The server should not receive a referrer which is not set by user agent.");')
+else:
+ sys.stdout.write('document.write("PASS: The server didn\'t receive a referrer.");')
+
+sys.stdout.write(
+ '}\n'
+ '</script>\n'
+ '</head>\n'
+ '<body onload="runTest()">\n'
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/referrer-result.php b/LayoutTests/http/tests/misc/resources/referrer-result.php
deleted file mode 100644
index 8e1d876..0000000
--- a/LayoutTests/http/tests/misc/resources/referrer-result.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<body>
-<script>
-
-var referer = "<?php echo $_SERVER["HTTP_REFERER"]; ?>";
-if (referer.match(/referrer.html/)) {
- document.write("PASS: Referer header exists and contains the string 'referrer.html'.");
-} else {
- document.write("FAIL: Referer header does not contain the string 'referrer.html', value is '" + referer + "'");
-}
-
-if (window.testRunner)
- testRunner.notifyDone();
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/resources/referrer-result.py b/LayoutTests/http/tests/misc/resources/referrer-result.py
new file mode 100755
index 0000000..eff7d55
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/referrer-result.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+referer = os.environ.get('HTTP_REFERER', '')
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ '<body>\n'
+ '<script>\n\n'
+ 'var referer = "{}";\n'
+ 'if (referer.match(/referrer.html/)) {{\n'
+ ' document.write("PASS: Referer header exists and contains the string \'referrer.html\'.");\n'
+ '}} else {{\n'
+ ' document.write("FAIL: Referer header does not contain the string \'referrer.html\', value is \'" + referer + "\'");\n'
+ '}}\n\n'
+ 'if (window.testRunner)\n'
+ ' testRunner.notifyDone();\n'
+ '</script>\n\n'
+ '</body>\n'
+ '</html>\n'.format(referer)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/script-500.php b/LayoutTests/http/tests/misc/resources/script-500.php
deleted file mode 100644
index 8f816f9..0000000
--- a/LayoutTests/http/tests/misc/resources/script-500.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-header('HTTP/1.1 500 Internal Server Error');
-?>
-document.getElementById('result').innerHTML = 'FAIL';
diff --git a/LayoutTests/http/tests/misc/resources/script-500.py b/LayoutTests/http/tests/misc/resources/script-500.py
new file mode 100755
index 0000000..c6270e1
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/script-500.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'status: 500\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+ 'document.getElementById(\'result\').innerHTML = \'FAIL\';\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/scsu-cyrillic.php b/LayoutTests/http/tests/misc/resources/scsu-cyrillic.php
deleted file mode 100644
index ffa6920..0000000
--- a/LayoutTests/http/tests/misc/resources/scsu-cyrillic.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-header('Content-Type: text/html; charset=SCSU');
-?>
-N:ÿº¸½
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/scsu-cyrillic.py b/LayoutTests/http/tests/misc/resources/scsu-cyrillic.py
new file mode 100755
index 0000000..e2c2119
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/scsu-cyrillic.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Type: text/html; charset=SCSU\r\n\r\n'
+ 'N:ŸÃ¿º¸½'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/send-async-xhr.html b/LayoutTests/http/tests/misc/resources/send-async-xhr.html
index 2821a8f..c0cf035 100644
--- a/LayoutTests/http/tests/misc/resources/send-async-xhr.html
+++ b/LayoutTests/http/tests/misc/resources/send-async-xhr.html
@@ -1,6 +1,6 @@
<script>
var req = new XMLHttpRequest();
-req.open("GET", "hang-connection.php", true);
+req.open("GET", "hang-connection.py", true);
req.onload = parent.requestLoaded;
req.send(null);
parent.requestSent();
diff --git a/LayoutTests/http/tests/misc/resources/slowimage.php b/LayoutTests/http/tests/misc/resources/slowimage.php
deleted file mode 100644
index 3d18986..0000000
--- a/LayoutTests/http/tests/misc/resources/slowimage.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-sleep(30);
-header('Cache-Control: no-cache, must-revalidate');
-header('Location: data:image/gif;base64,R0lGODlhAQABAJAAAMjIyAAAACwAAAAAAQABAAACAgQBADs%3D');
-?>
diff --git a/LayoutTests/http/tests/misc/resources/slowimage.py b/LayoutTests/http/tests/misc/resources/slowimage.py
new file mode 100755
index 0000000..8bee037
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/slowimage.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+time.sleep(30)
+
+sys.stdout.write(
+ 'Cache-Control: no-cache, must-revalidate\r\n'
+ 'Location: data:image/gif;base64,R0lGODlhAQABAJAAAMjIyAAAACwAAAAAAQABAAACAgQBADs%3D\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.php b/LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.php
deleted file mode 100644
index a2fdd23..0000000
--- a/LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
- if (preg_match("/\*\/\*/", $_SERVER["HTTP_ACCEPT"])) {
-?>
- p#target { position: relative; }
- /* This stylesheet is served as text/html */
-<?php
- } else {
- header("Not acceptable", true, 406);
- }
-?>
diff --git a/LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.py b/LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.py
new file mode 100755
index 0000000..0681154
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+
+import os
+import re
+import sys
+
+http_accept = os.environ.get('HTTP_ACCEPT', '')
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if re.findall('/*/*/', http_accept):
+ sys.stdout.write(
+ '\r\n'
+ ' p#target { position: relative; }\n'
+ ' /* This stylesheet is served as text/html */\n'
+ )
+else:
+ sys.stdout.write('status: 406\r\n\r\n')
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.php b/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.php
deleted file mode 100644
index 268849a..0000000
--- a/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
- // Tests run from 127.0.0.1, so localhost will appear to be a different origin.
- header('Location: http://localhost:8000/misc/resources/webtiming-cross-origin-and-back-redirect2.php');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.py b/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.py
new file mode 100755
index 0000000..cafc156
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect1.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: http://localhost:8000/misc/resources/webtiming-cross-origin-and-back-redirect2.py\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.php b/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.php
deleted file mode 100644
index 59c6b7a..0000000
--- a/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
- // 127.0.0.1 is where the test originally started. We redirected to "localhost" before this.
- header('Location: http://127.0.0.1:8000/misc/resources/webtiming-cross-origin-and-back2.html');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.py b/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.py
new file mode 100755
index 0000000..f4e3461
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back-redirect2.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+import sys
+
+# 127.0.0.1 is where the test originally started. We redirected to "localhost" before this.
+sys.stdout.write(
+ 'Location: http://127.0.0.1:8000/misc/resources/webtiming-cross-origin-and-back2.html\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/script-500.html b/LayoutTests/http/tests/misc/script-500.html
index 7c73cca..968d993 100644
--- a/LayoutTests/http/tests/misc/script-500.html
+++ b/LayoutTests/http/tests/misc/script-500.html
@@ -6,6 +6,6 @@
if (window.testRunner)
testRunner.dumpAsText();
</script>
-<script onerror="document.getElementById('result').innerHTML = 'PASS';" src="resources/script-500.php" type="text/javascript"></script>
+<script onerror="document.getElementById('result').innerHTML = 'PASS';" src="resources/script-500.py" type="text/javascript"></script>
</body>
</html>
diff --git a/LayoutTests/http/tests/misc/script-no-store.html b/LayoutTests/http/tests/misc/script-no-store.html
index 352e0c0..ae21c22 100644
--- a/LayoutTests/http/tests/misc/script-no-store.html
+++ b/LayoutTests/http/tests/misc/script-no-store.html
@@ -10,7 +10,7 @@
function addRandom()
{
var script = document.createElement("script");
- script.setAttribute("src", "resources/random-no-store.php");
+ script.setAttribute("src", "resources/random-no-store.py");
document.body.appendChild(script);
}
++count;
diff --git a/LayoutTests/http/tests/misc/submit-post-keygen.html b/LayoutTests/http/tests/misc/submit-post-keygen.html
index c5c4c9bc..254637b 100644
--- a/LayoutTests/http/tests/misc/submit-post-keygen.html
+++ b/LayoutTests/http/tests/misc/submit-post-keygen.html
@@ -12,7 +12,7 @@
</script>
</head>
<body onload="clickf()">
-<form name="f" action="resources/check-keygen-post.php" method="post">
+<form name="f" action="resources/check-keygen-post.py" method="post">
<keygen name="spkac" keytype="RSA" />
</form>
</body>
diff --git a/LayoutTests/http/tests/misc/svg-image-load-outlives-gc-without-crashing.html b/LayoutTests/http/tests/misc/svg-image-load-outlives-gc-without-crashing.html
index 2c1bc2a..95d3ef4 100644
--- a/LayoutTests/http/tests/misc/svg-image-load-outlives-gc-without-crashing.html
+++ b/LayoutTests/http/tests/misc/svg-image-load-outlives-gc-without-crashing.html
@@ -20,7 +20,7 @@
This has an svg element that contains an svg image element. That svg element is wrapped in a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.<br>
<div id="thediv">
<svg>
-<image xlink:href="resources/slowimage.php" />
+<image xlink:href="resources/slowimage.py" />
</svg>
</div>
</body>
diff --git a/LayoutTests/http/tests/misc/timer-vs-loading.html b/LayoutTests/http/tests/misc/timer-vs-loading.html
index fec8fe1..46ed5d5 100644
--- a/LayoutTests/http/tests/misc/timer-vs-loading.html
+++ b/LayoutTests/http/tests/misc/timer-vs-loading.html
@@ -28,7 +28,7 @@
<script>
window.setTimeout("updateClock()", 100);
- setTimeout('window.location = "resources/hang-connection.php"', 0);
+ setTimeout('window.location = "resources/hang-connection.py"', 0);
</script>
</body></html>
diff --git a/LayoutTests/http/tests/misc/url-in-utf16be.html b/LayoutTests/http/tests/misc/url-in-utf16be.html
index 0fd9ccd..2327b7b 100644
--- a/LayoutTests/http/tests/misc/url-in-utf16be.html
+++ b/LayoutTests/http/tests/misc/url-in-utf16be.html
Binary files differ
diff --git a/LayoutTests/http/tests/misc/url-in-utf16le.html b/LayoutTests/http/tests/misc/url-in-utf16le.html
index 2d7bc63..e1b0c7f 100644
--- a/LayoutTests/http/tests/misc/url-in-utf16le.html
+++ b/LayoutTests/http/tests/misc/url-in-utf16le.html
Binary files differ
diff --git a/LayoutTests/http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html b/LayoutTests/http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html
index 26e50e0..2846f1e 100644
--- a/LayoutTests/http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html
+++ b/LayoutTests/http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html
@@ -19,7 +19,7 @@
This has a video element with an image for its poster frame. That video element is wrapped in a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.<br>
<div id="thediv">
-<video poster="resources/slowimage.php">
+<video poster="resources/slowimage.py">
</video>
</div>
</body>
diff --git a/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1.html b/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1.html
index ce88c67..cdbf41a 100644
--- a/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1.html
+++ b/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1.html
@@ -5,7 +5,7 @@
if (window.testRunner)
testRunner.waitUntilDone();
function doRedirect() {
- window.location = "http://127.0.0.1:8000/misc/resources/webtiming-cross-origin-and-back-redirect1.php";
+ window.location = "http://127.0.0.1:8000/misc/resources/webtiming-cross-origin-and-back-redirect1.py";
}
addEventListener("load", function() {
setTimeout(doRedirect, 0);
diff --git a/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect.php b/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect.php
deleted file mode 100644
index 5f98197..0000000
--- a/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
- // Tests run from 127.0.0.1, so localhost will appear to be a different origin.
- header('Location: http://localhost:8080/misc/resources/webtiming-cross-origin-redirect.html');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect.py b/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect.py
new file mode 100755
index 0000000..c50603e
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: http://localhost:8080/misc/resources/webtiming-cross-origin-redirect.html\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/webtiming-one-redirect.php b/LayoutTests/http/tests/misc/webtiming-one-redirect.php
deleted file mode 100644
index 6e3931c..0000000
--- a/LayoutTests/http/tests/misc/webtiming-one-redirect.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('Location: resources/webtiming-one-redirect.html');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/webtiming-one-redirect.py b/LayoutTests/http/tests/misc/webtiming-one-redirect.py
new file mode 100755
index 0000000..b1e76f8
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-one-redirect.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: resources/webtiming-one-redirect.html\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/webtiming-slow-load.php b/LayoutTests/http/tests/misc/webtiming-slow-load.php
deleted file mode 100644
index 877ed31..0000000
--- a/LayoutTests/http/tests/misc/webtiming-slow-load.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script>
-</script>
-<script src="../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script>
-description("Verifies that requestStart and responseStart are available before the main document has finished loading.");
-
-window.performance = window.performance || {};
-var navigation = performance.navigation || {};
-var timing = performance.timing || {};
-
-shouldBeNonZero("timing.requestStart");
-shouldBeNonZero("timing.responseStart");
-shouldBe("timing.responseEnd", "0");
-
-</script>
-<script src="../../js-test-resources/js-test-post.js"></script>
-<?php
- echo str_repeat(" ", 100000);
- flush();
- ob_flush();
- sleep(1);
-?>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/webtiming-slow-load.py b/LayoutTests/http/tests/misc/webtiming-slow-load.py
new file mode 100755
index 0000000..6cbf398
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-slow-load.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">\n'
+ '<html>\n'
+ '<head>\n'
+ '<script>\n'
+ '</script>\n'
+ '<script src="../../js-test-resources/js-test-pre.js"></script>\n'
+ '</head>\n'
+ '<body>\n'
+ '<p id="description"></p>\n'
+ '<div id="console"></div>\n'
+ '<script>\n'
+ 'description("Verifies that requestStart and responseStart are available before the main document has finished loading.");\n'
+ '\n'
+ 'window.performance = window.performance || {};\n'
+ 'var navigation = performance.navigation || {};\n'
+ 'var timing = performance.timing || {};\n'
+ '\n'
+ 'shouldBeNonZero("timing.requestStart");\n'
+ 'shouldBeNonZero("timing.responseStart");\n'
+ 'shouldBe("timing.responseEnd", "0");\n'
+ '\n'
+ '</script>\n'
+ '<script src="../../js-test-resources/js-test-post.js"></script>\n'
+)
+
+sys.stdout.write(' ' * 100000)
+sys.stdout.flush()
+time.sleep(1)
+
+sys.stdout.write(
+ '</body>\n'
+ '</html>\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/webtiming-ssl.php b/LayoutTests/http/tests/misc/webtiming-ssl.php
deleted file mode 100644
index 0fe579d..0000000
--- a/LayoutTests/http/tests/misc/webtiming-ssl.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('Location: https://127.0.0.1:8443/misc/resources/webtiming-ssl.html');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/webtiming-ssl.py b/LayoutTests/http/tests/misc/webtiming-ssl.py
new file mode 100755
index 0000000..a312612
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-ssl.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: https://127.0.0.1:8443/misc/resources/webtiming-ssl.html\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/webtiming-two-redirects.php b/LayoutTests/http/tests/misc/webtiming-two-redirects.php
deleted file mode 100644
index 8399dbb..0000000
--- a/LayoutTests/http/tests/misc/webtiming-two-redirects.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
- header('Location: ../resources/redirect.py?url=../misc/resources/webtiming-two-redirects.html');
- header('HTTP/1.0 302 Found');
-?>
diff --git a/LayoutTests/http/tests/misc/webtiming-two-redirects.py b/LayoutTests/http/tests/misc/webtiming-two-redirects.py
new file mode 100755
index 0000000..d6c8fc6
--- /dev/null
+++ b/LayoutTests/http/tests/misc/webtiming-two-redirects.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Location: ../resources/redirect.py?url=../misc/resources/webtiming-two-redirects.html\r\n'
+ 'status: 302\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/misc/xhtml.php b/LayoutTests/http/tests/misc/xhtml.php
deleted file mode 100644
index 3b5b796..0000000
--- a/LayoutTests/http/tests/misc/xhtml.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<body>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-var accept = "<?php echo $_SERVER["HTTP_ACCEPT"]; ?>";
-document.write("Accept: " + accept + "<br><br>");
-if (accept.match(/application\/xhtml\+xml/)) {
- document.write("PASS: The browser asks for XHTML.");
-} else {
- document.write("FAIL: The browser doesn't ask for XHTML");
-}
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/http/tests/misc/xhtml.py b/LayoutTests/http/tests/misc/xhtml.py
new file mode 100755
index 0000000..1655f34
--- /dev/null
+++ b/LayoutTests/http/tests/misc/xhtml.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+accept = os.environ.get('HTTP_ACCEPT', '')
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ '<body>\n'
+ '<script>\n'
+ 'if (window.testRunner)\n'
+ ' testRunner.dumpAsText();\n'
+ '\n'
+ 'var accept = "{}";\n'
+ 'document.write("Accept: " + accept + "<br><br>");\n'
+ 'if (accept.match(/application\\/xhtml\\+xml/)) {{\n'
+ ' document.write("PASS: The browser asks for XHTML.");\n'
+ '}} else {{\n'
+ ' document.write("FAIL: The browser doesn\'t ask for XHTML");\n'
+ '}}\n'
+ '</script>\n'
+ '\n'
+ '</body>\n'
+ '</html>\n'.format(accept)
+)
\ No newline at end of file
diff --git a/LayoutTests/http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html b/LayoutTests/http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html
index 34e34f2..11c6f50 100644
--- a/LayoutTests/http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html
+++ b/LayoutTests/http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html
@@ -11,7 +11,7 @@
var test = async_test("Testing timing out preflight")
test.step(function() {
var client = new XMLHttpRequest()
- var url = "http://localhost:8000/misc/resources/delayed-log.php?delay=10000000"
+ var url = "http://localhost:8000/misc/resources/delayed-log.py?delay=10000000"
client.open("GET", url, true)
client.setRequestHeader("X-Custom", "test")
client.hasTimedout = false;
diff --git a/LayoutTests/http/tests/xmlhttprequest/resetting-timeout-to-zero.html b/LayoutTests/http/tests/xmlhttprequest/resetting-timeout-to-zero.html
index 303ee96..45dc59b8 100644
--- a/LayoutTests/http/tests/xmlhttprequest/resetting-timeout-to-zero.html
+++ b/LayoutTests/http/tests/xmlhttprequest/resetting-timeout-to-zero.html
@@ -12,7 +12,7 @@
return new Promise((resolve, reject) => {
var xhr = new XMLHttpRequest();
var startTime = new Date();
- xhr.open('GET', "/misc/resources/delayed-log.php?delay=10000000", true);
+ xhr.open('GET', "/misc/resources/delayed-log.py?delay=10000000", true);
xhr.timeout = 70000; // time in milliseconds
diff --git a/LayoutTests/http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html b/LayoutTests/http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html
index bf1edcc..dc895d3 100644
--- a/LayoutTests/http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html
+++ b/LayoutTests/http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html
@@ -12,7 +12,7 @@
return new Promise((resolve, reject) => {
var xhr = new XMLHttpRequest();
var startTime = new Date();
- xhr.open('GET', "/misc/resources/delayed-log.php?delay=10000000", true);
+ xhr.open('GET', "/misc/resources/delayed-log.py?delay=10000000", true);
xhr.timeout = 70000;
diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations
index 5853706..b68c442 100644
--- a/LayoutTests/platform/gtk/TestExpectations
+++ b/LayoutTests/platform/gtk/TestExpectations
@@ -1632,7 +1632,7 @@
webkit.org/b/186781 inspector/view/asynchronous-layout.html [ Timeout Pass ]
-Bug(GTK) http/tests/misc/large-js-program.php [ Pass Slow ]
+Bug(GTK) http/tests/misc/large-js-program.py [ Pass Slow ]
[ Debug ] editing/selection/move-by-character-brute-force.html [ Pass Timeout ]
[ Debug ] editing/selection/move-by-word-visually-inline-block-positioned-element.html [ Pass Timeout ]
diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations
index 56e039b..5b122c3 100644
--- a/LayoutTests/platform/ios/TestExpectations
+++ b/LayoutTests/platform/ios/TestExpectations
@@ -2236,7 +2236,7 @@
webkit.org/b/152992 http/tests/loading/preload-picture-sizes.html [ Skip ]
webkit.org/b/152140 fast/picture/viewport-resize.html [ Skip ]
-webkit.org/b/152279 http/tests/misc/large-js-program.php [ Skip ]
+webkit.org/b/152279 http/tests/misc/large-js-program.py [ Skip ]
webkit.org/b/152279 js/dom/line-column-numbers.html [ Skip ]
webkit.org/b/152137 fast/media/mq-any-hover-matchMedia.html [ Failure ]
diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations
index fb0fc1c..1602165 100644
--- a/LayoutTests/platform/mac/TestExpectations
+++ b/LayoutTests/platform/mac/TestExpectations
@@ -1538,7 +1538,7 @@
webkit.org/b/170877 [ Debug ] webgl/1.0.3/conformance/glsl/misc/shader-with-reserved-words.html [ Pass Timeout ]
-webkit.org/b/190724 [ Debug ] http/tests/misc/large-js-program.php [ Pass Timeout ]
+webkit.org/b/190724 [ Debug ] http/tests/misc/large-js-program.py [ Pass Timeout ]
webkit.org/b/191565 imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html [ Pass Slow ]
diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations
index 8844e2e..fce1d57 100644
--- a/LayoutTests/platform/win/TestExpectations
+++ b/LayoutTests/platform/win/TestExpectations
@@ -398,7 +398,7 @@
webkit.org/b/42435 fast/dom/webtiming.html [ Skip ]
webkit.org/b/42435 fast/performance/ [ Skip ]
webkit.org/b/42435 http/tests/misc/webtiming-cross-origin-and-back1.html [ Skip ]
-webkit.org/b/42435 http/tests/misc/webtiming-cross-origin-redirect.php [ Skip ]
+webkit.org/b/42435 http/tests/misc/webtiming-cross-origin-redirect.py [ Skip ]
webkit.org/b/42435 http/tests/misc/webtiming-no-origin.html [ Skip ]
webkit.org/b/42435 http/tests/misc/webtiming-one-redirect.php [ Skip ]
webkit.org/b/42435 http/tests/misc/webtiming-resolution.html [ Skip ]
@@ -2991,7 +2991,7 @@
webkit.org/b/187700 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html [ Skip ]
# <rdar://problem/21816197> large-js-program.php crashes (crashes slower on Debug)
-http/tests/misc/large-js-program.php [ Crash Timeout ]
+http/tests/misc/large-js-program.py [ Crash Timeout ]
# Slider thumb widget painting
fast/repaint/block-inputrange-repaint.html [ Pass Failure ]
diff --git a/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt b/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt
index 2cc9d10..cbcffa7 100644
--- a/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt
+++ b/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt
@@ -2,7 +2,7 @@
main frame - didCommitLoadForFrame
frame "<!--frame1-->" - didStartProvisionalLoadForFrame
main frame - didFinishDocumentLoadForFrame
-http://127.0.0.1:8000/loading/resources/basic-auth-testing.php?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks
+http://127.0.0.1:8000/loading/resources/basic-auth-testing.py?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks
frame "<!--frame1-->" - didCommitLoadForFrame
frame "<!--frame1-->" - didFinishDocumentLoadForFrame
frame "<!--frame1-->" - didHandleOnloadEventsForFrame
diff --git a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
index d859b15..caf406f 100644
--- a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
+++ b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt
@@ -1,7 +1,7 @@
localhost:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=40138
You should load this page at 127.0.0.1:8000 so localhost:8000 is considered a different security origin.
-This test loads a php script which demands http authentication, then uses it to redirect to another script in a different origin that shows what authentication headers were sent with the final request.
+This test loads a py script which demands http authentication, then uses it to redirect to another script in a different origin that shows what authentication headers were sent with the final request.
It does this once each for HTTP 301, 302, 303, and 307 redirects.
If not running under DRT, enter any credentials when asked.
diff --git a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
index d59fee5..903d349 100644
--- a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
+++ b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt
@@ -1,7 +1,7 @@
127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=66354
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.
-This test loads a php script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
+This test loads a py script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
It does this once each for HTTP 301, 302, 303, and 307 redirects.
If not running under DRT, enter any credentials when asked.
diff --git a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
index 89d98d0..5c87fac 100644
--- a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
+++ b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt
@@ -1,7 +1,7 @@
127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=66354
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.
-This test loads a php script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
+This test loads a py script which demands http authentication, then uses it to redirect to another script in the same origin that shows what authentication headers were sent with the final request.
The redirect includes credentials in the location url, and they should be preferred over credentials that WebCore has cached.
It does this once each for HTTP 301, 302, 303, and 307 redirects.
If not running under DRT, enter any credentials when asked.
diff --git a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
index 217c8ca..75c1e6b 100644
--- a/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
+++ b/LayoutTests/platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt
@@ -1,11 +1,11 @@
127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with testUser:testPassword
https://bugs.webkit.org/show_bug.cgi?id=105190
You should load this page at 127.0.0.1:8000 because the test relies on redirects within the 127.0.0.1:8000 security origin.
-This test loads a php script which demands http authentication, then uses it to redirect via 301 to another script in the same origin that shows what authentication headers were sent with the final request. It verifies that the credentials are not placed in the final URL.
+This test loads a py script which demands http authentication, then uses it to redirect via 301 to another script in the same origin that shows what authentication headers were sent with the final request. It verifies that the credentials are not placed in the final URL.
If not running under DRT, enter any credentials when asked.
--------
Frame: '<!--frame1-->'
--------
-http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-echo.php loaded with HTTP authentication username 'testUser' and password 'testPassword'
+http://127.0.0.1:8000/misc/authentication-redirect-4/resources/auth-echo.py loaded with HTTP authentication username 'testUser' and password 'testPassword'