Skip to content

Commit

Permalink
[fetch] Introduce test generation tool & add more tests for metadata …
Browse files Browse the repository at this point in the history
…request headers (#25247)
  • Loading branch information
jugglinmike authored Apr 29, 2022
1 parent 41fb91f commit 9bbcf35
Show file tree
Hide file tree
Showing 144 changed files with 27,765 additions and 1,516 deletions.
11 changes: 11 additions & 0 deletions common/refresh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def main(request, response):
"""
Respond with a blank HTML document and a `Refresh` header which describes
an immediate redirect to the URL specified by the requests `location` query
string parameter
"""
headers = [
(b'Content-Type', b'text/html'),
(b'Refresh', b'0; URL=' + request.GET.first(b'location'))
]
return (200, headers, b'')
2 changes: 2 additions & 0 deletions fetch/api/resources/redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def main(request, response):

if b"redirect_status" in request.GET:
status = int(request.GET[b'redirect_status'])
elif b"redirect_status" in request.POST:
status = int(request.POST[b'redirect_status'])

stashed_data[b'count'] += 1

Expand Down
37 changes: 0 additions & 37 deletions fetch/metadata/download.https.sub.html

This file was deleted.

67 changes: 0 additions & 67 deletions fetch/metadata/favicon.https.sub.html

This file was deleted.

50 changes: 0 additions & 50 deletions fetch/metadata/fetch-via-serviceworker--fallback.https.sub.html

This file was deleted.

51 changes: 0 additions & 51 deletions fetch/metadata/fetch-via-serviceworker--respondWith.https.sub.html

This file was deleted.

29 changes: 0 additions & 29 deletions fetch/metadata/fetch.sub.html

This file was deleted.

78 changes: 0 additions & 78 deletions fetch/metadata/font.https.sub.html

This file was deleted.

Loading

0 comments on commit 9bbcf35

Please sign in to comment.