Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #61 from PolymerElements/fix-fetch-test
Browse files Browse the repository at this point in the history
Workaround for M47 HTTP 204 Response bug
  • Loading branch information
jeffposnick committed Aug 25, 2015
2 parents fd9190f + c4d3cb2 commit d56dc27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/platinum-sw-fetch/custom-fetch-handler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
self.custom204FetchHandler = function(request) {
self.custom203FetchHandler = function(request) {
return new Response('', {
status: 204,
status: 203,
statusText: 'Via customFetchHandler'
});
};
Expand Down
4 changes: 2 additions & 2 deletions test/platinum-sw-fetch/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<body>
<platinum-sw-register skip-waiting clients-claim auto-register>
<platinum-sw-fetch handler="custom204FetchHandler"
<platinum-sw-fetch handler="custom203FetchHandler"
path="/(.*)customFetch"></platinum-sw-fetch>
<platinum-sw-fetch handler="custom410FetchHandler"
path="/(.*)customFetch"
Expand All @@ -36,7 +36,7 @@
test('the same-origin custom fetch handler is used when the path matches', function() {
return navigator.serviceWorker.ready.then(function() {
return window.fetch('customFetch').then(function(response) {
assert.equal(response.status, 204, 'Custom response status doesn\'t match');
assert.equal(response.status, 203, 'Custom response status doesn\'t match');
});
});
});
Expand Down

0 comments on commit d56dc27

Please sign in to comment.