File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
framework/Magento/TestFramework/TestCase/GraphQl
testsuite/Magento/GraphQl Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ private function processResponseHeaders(string $headers): array
213213
214214 $ headerLines = preg_split ('/((\r?\n)|(\r\n?))/ ' , $ headers );
215215 foreach ($ headerLines as $ headerLine ) {
216- $ headerParts = preg_split ('/:/ ' , $ headerLine );
216+ $ headerParts = preg_split ('/: / ' , $ headerLine, 2 );
217217 if (count ($ headerParts ) == 2 ) {
218218 $ headersArray [trim ($ headerParts [0 ])] = trim ($ headerParts [1 ]);
219219 } elseif (preg_match ('/HTTP\/[\.0-9]+/ ' , $ headerLine )) {
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function testCorsHeadersWhenCorsIsEnabled(): void
7676 $ this ->resourceConfig ->saveConfig (Configuration::XML_PATH_CORS_ALLOWED_HEADERS , 'Origin ' );
7777 $ this ->resourceConfig ->saveConfig (Configuration::XML_PATH_CORS_ALLOW_CREDENTIALS , '1 ' );
7878 $ this ->resourceConfig ->saveConfig (Configuration::XML_PATH_CORS_ALLOWED_METHODS , 'GET,POST ' );
79- $ this ->resourceConfig ->saveConfig (Configuration::XML_PATH_CORS_ALLOWED_ORIGINS , 'magento.local ' );
79+ $ this ->resourceConfig ->saveConfig (Configuration::XML_PATH_CORS_ALLOWED_ORIGINS , 'http:// magento.local ' );
8080 $ this ->resourceConfig ->saveConfig (Configuration::XML_PATH_CORS_MAX_AGE , '86400 ' );
8181 $ this ->reinitConfig ->reinit ();
8282
@@ -85,7 +85,7 @@ public function testCorsHeadersWhenCorsIsEnabled(): void
8585 self ::assertEquals ('Origin ' , $ headers ['Access-Control-Allow-Headers ' ]);
8686 self ::assertEquals ('1 ' , $ headers ['Access-Control-Allow-Credentials ' ]);
8787 self ::assertEquals ('GET,POST ' , $ headers ['Access-Control-Allow-Methods ' ]);
88- self ::assertEquals ('magento.local ' , $ headers ['Access-Control-Allow-Origin ' ]);
88+ self ::assertEquals ('http:// magento.local ' , $ headers ['Access-Control-Allow-Origin ' ]);
8989 self ::assertEquals ('86400 ' , $ headers ['Access-Control-Max-Age ' ]);
9090 }
9191
You can’t perform that action at this time.
0 commit comments