| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="/js-test-resources/js-test.js"></script> |
| <script> |
| description("Tests that the Authorization header is present on same-origin redirect requests."); |
| jsTestIsAsync = true; |
| |
| fetch("/resources/redirect.py?url=" + encodeURIComponent("/fetch/resources/dump-authorization-header.py"), { |
| headers: { |
| Authorization: 'Foo Bar', |
| }, |
| }).then((response) => response.text()).then((_data) => { |
| authorization = _data; |
| shouldBeEqualToString("authorization", "Foo Bar"); |
| finishJSTest(); |
| }); |
| </script> |
| </body> |
| </html> |