Skip to content

Various improvements and update to the http cache - #23494

Merged
bors-servo merged 4 commits into
servo:masterfrom
gterzian:improve_http_cache
Jun 22, 2019
Merged

bors-servo merged 4 commits into
servo:masterfrom
gterzian:improve_http_cache

Conversation

@gterzian

@gterzian gterzian commented Jun 1, 2019 •

Copy link
Copy Markdown
Member

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___

This change is Reviewable

@highfive

highfive commented Jun 1, 2019

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/net/fetch/methods.rs, components/net/http_cache.rs

@highfive

highfive commented Jun 1, 2019

Copy link
Copy Markdown

warning Warning warning

  • These commits modify net code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 1, 2019
@gterzian gterzian mentioned this pull request Jun 1, 2019
@gterzian
gterzian force-pushed the improve_http_cache branch from 3b68a9b to 8647d75 Compare June 2, 2019 05:59
@gterzian

gterzian commented Jun 2, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit b6c165b with merge 88ddc41...

bors-servo pushed a commit that referenced this pull request Jun 2, 2019
[WIP] Improve http cache

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23494)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 2, 2019
@gterzian

gterzian commented Jun 2, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 15757d8 with merge 56f5256...

bors-servo pushed a commit that referenced this pull request Jun 2, 2019
[WIP] Improve http cache

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23494)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 2, 2019
@gterzian
gterzian force-pushed the improve_http_cache branch from 15757d8 to f5c9ff8 Compare June 2, 2019 07:09
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Jun 2, 2019
@gterzian

gterzian commented Jun 2, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit f5c9ff8 with merge 2e5e02d...

bors-servo pushed a commit that referenced this pull request Jun 2, 2019
[WIP] Improve http cache

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23494)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 2, 2019
@gterzian gterzian changed the title [WIP] Improve http cache Improve handling of 206 responses/Range requests by the http cache Jun 3, 2019
@gterzian
gterzian force-pushed the improve_http_cache branch from 63e9b79 to 80515c4 Compare June 3, 2019 03:09
@gterzian

gterzian commented Jun 3, 2019

Copy link
Copy Markdown
Member Author

Ok this one is now ready for review, note the test at https://github.com/servo/servo/blob/master/tests/wpt/metadata/fetch/http-cache/partial.html.ini went from "failing because of an unexpected 206 response being returned" to "failing because we're not making an additional request to complete the partial response being received".

So there was a bug of returning a 206 in case of request that didn't include Range...

@jdm r?

@Manishearth

Copy link
Copy Markdown
Member

r? @jdm

@gterzian
gterzian force-pushed the improve_http_cache branch from 80515c4 to 4f41065 Compare June 17, 2019 05:20
@jdm

jdm commented Jun 17, 2019

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 4f41065 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 17, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 4f41065 with merge b04b449...

bors-servo pushed a commit that referenced this pull request Jun 17, 2019
Improve handling of 206 responses/Range requests by the http cache

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23494)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 17, 2019
@gterzian

gterzian commented Jun 19, 2019 •

Copy link
Copy Markdown
Member Author
{
    "status": "FAIL", 
    "group": "default", 
    "message": "assert_equals: Response 3 status is 304, not 200 expected 200 but got 304", 
    "stack": "checkResponse@http://web-platform.test:8000/fetch/http-cache/http-cache.js:149:7\n", 
    "subtest": "HTTP cache updates stored headers from a Last-Modified 304", 
    "test": "/fetch/http-cache/304-update.html", 
    "line": 83692, 
    "action": "test_result", 
    "expected": "PASS"
}
{
    "status": "FAIL", 
    "group": "default", 
    "message": "assert_equals: Response 3 status is 304, not 200 expected 200 but got 304", 
    "stack": "checkResponse@http://web-platform.test:8000/fetch/http-cache/http-cache.js:149:7\n", 
    "subtest": "HTTP cache updates stored headers from a ETag 304", 
    "test": "/fetch/http-cache/304-update.html", 
    "line": 83694, 
    "action": "test_result", 
    "expected": "PASS"
}
{
    "status": "FAIL", 
    "group": "default", 
    "message": "assert_equals: Response 3 status is 304, not 200 expected 200 but got 304", 
    "stack": "checkResponse@http://web-platform.test:8000/fetch/http-cache/http-cache.js:149:7\n", 
    "subtest": "Content-* header", 
    "test": "/fetch/http-cache/304-update.html", 
    "line": 83695, 
    "action": "test_result", 
    "expected": "PASS"
}

Interesting so what I saw at #23553 had nothing to do with those other changes, I think it actually relates to making this a while loop, which I had done in the other also...

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 19, 2019
@gterzian

Copy link
Copy Markdown
Member Author

@jdm I've added a separate commit dealing with the issue...

@gterzian gterzian mentioned this pull request Jun 19, 2019
5 tasks
@gterzian

gterzian commented Jun 22, 2019 •

Copy link
Copy Markdown
Member Author

@jdm I added a few commits which are essentially copied across from #23553 plus one "easy" feature of not caching requests with authorizations headers...

@gterzian gterzian changed the title Improve handling of 206 responses/Range requests by the http cache Various improvements and update to the http cache Jun 22, 2019
@jdm

jdm commented Jun 22, 2019

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 689b797 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 22, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 689b797 with merge 5592682...

bors-servo pushed a commit that referenced this pull request Jun 22, 2019
Various improvements and update to the http cache

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23494)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - arm64, linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: jdm
Pushing 5592682 to master...

@bors-servo
bors-servo merged commit 689b797 into servo:master Jun 22, 2019
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 22, 2019
@gterzian
gterzian deleted the improve_http_cache branch June 24, 2019 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants