WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-221140-20210131195321.patch (text/plain), 3.68 KB, created by
Chris Gambrell
on 2021-01-31 17:53:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Gambrell
Created:
2021-01-31 17:53:22 PST
Size:
3.68 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 272128) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2021-01-31 Chris Gambrell <cgambrell@apple.com> >+ >+ [LayoutTests] Convert http/tests/inspector/ convert PHP to Python >+ https://bugs.webkit.org/show_bug.cgi?id=221140 >+ <rdar://problem/73758592> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * http/tests/inspector/network/resource-request-headers.html: >+ * http/tests/inspector/network/resources/basic-auth.php: Removed. >+ * http/tests/inspector/network/resources/basic-auth.py: Added. >+ > 2021-01-31 Sam Weinig <weinig@apple.com> > > Add support for color(prophoto-rgb ...) as part of CSS Color 4 >Index: LayoutTests/http/tests/inspector/network/resource-request-headers.html >=================================================================== >--- LayoutTests/http/tests/inspector/network/resource-request-headers.html (revision 272127) >+++ LayoutTests/http/tests/inspector/network/resource-request-headers.html (working copy) >@@ -13,7 +13,7 @@ function triggerNetworkLoad() { > > function triggerNetworkLoadWithBasicAuthentication(username, password) { > let xhr = new XMLHttpRequest(); >- xhr.open("GET", "resources/basic-auth.php?" + Math.random(), true, username, password); >+ xhr.open("GET", "resources/basic-auth.py?" + Math.random(), true, username, password); > xhr.onload = xhr.onerror = () => { TestPage.dispatchEventToFrontend("LoadComplete"); }; > xhr.send(); > } >Index: LayoutTests/http/tests/inspector/network/resources/basic-auth.php >=================================================================== >--- LayoutTests/http/tests/inspector/network/resources/basic-auth.php (revision 272127) >+++ LayoutTests/http/tests/inspector/network/resources/basic-auth.php (nonexistent) >@@ -1,14 +0,0 @@ >-<?php >-$expectedUsername = "goodUsername"; >-$expectedPassword = "goodPassword"; >-$realm = $_SERVER["REQUEST_URI"]; >- >-if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $expectedUsername || >- !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW'] != $expectedPassword) { >- header("WWW-Authenticate: Basic realm=\"" . $realm . "\""); >- header("HTTP/1.0 401 Unauthorized"); >- print "Bad username:password (" . $_SERVER['PHP_AUTH_USER'] . ":" . $_SERVER["PHP_AUTH_PW"] . ")"; >- exit; >-} >-?> >-Success >Index: LayoutTests/http/tests/inspector/network/resources/basic-auth.py >=================================================================== >--- LayoutTests/http/tests/inspector/network/resources/basic-auth.py (nonexistent) >+++ LayoutTests/http/tests/inspector/network/resources/basic-auth.py (working copy) >@@ -0,0 +1,24 @@ >+#!/usr/bin/env python3 >+ >+import base64 >+import os >+import sys >+ >+sys.stdout.write('Content-Type: text/html' + '\r\n') >+ >+expectedUsername = "goodUsername" >+expectedPassword = "goodPassword" >+realm = os.environ.get('REQUEST_URI') >+ >+credentials = base64.b64decode(os.environ.get('HTTP_AUTHORIZATION', ' Og==').split(' ')[1]).decode().split(':') >+username = credentials[0] >+password = ':'.join(credentials[1:]) >+ >+if (username != expectedUsername) or (password != expectedPassword): >+ sys.stdout.write('WWW-Authenticate: Basic realm=\"' + realm + '\"\r\n') >+ sys.stdout.write('status: 401\r\n') >+ sys.stdout.write('\r\n') >+ >+ sys.stdout.write('Bad username:password (' + username + ':' + password + ')') >+else: >+ sys.stdout.write('\r\n') >\ No newline at end of file > >Property changes on: LayoutTests/http/tests/inspector/network/resources/basic-auth.py >___________________________________________________________________ >Added: svn:executable >## -0,0 +1 ## >+* >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 221140
:
418744
|
418795
|
418837
|
418873
|
418875
|
418882
|
418898
|
418905
|
418909
|
418914
|
418938
|
418943
|
419042
|
419045
|
419058
|
419644
|
419670
|
419724