Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements and update to the http cache #23494

Merged
merged 4 commits into from Jun 22, 2019

Conversation

@gterzian
Copy link
Member

gterzian commented Jun 1, 2019


  • ./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
Copy link

highfive commented Jun 1, 2019

Heads up! This PR modifies the following files:

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

highfive commented Jun 1, 2019

warning Warning warning

  • These commits modify net code, but no tests are modified. Please consider adding a test!
@gterzian gterzian mentioned this pull request Jun 1, 2019
@gterzian gterzian force-pushed the gterzian:improve_http_cache branch from 3b68a9b to 8647d75 Jun 2, 2019
@gterzian
Copy link
Member Author

gterzian commented Jun 2, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2019

Trying commit b6c165b with merge 88ddc41...

bors-servo added 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
Contributor

bors-servo commented Jun 2, 2019

💔 Test failed - linux-rel-wpt

@gterzian
Copy link
Member Author

gterzian commented Jun 2, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2019

Trying commit 15757d8 with merge 56f5256...

bors-servo added 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
Contributor

bors-servo commented Jun 2, 2019

💔 Test failed - linux-rel-wpt

@gterzian gterzian force-pushed the gterzian:improve_http_cache branch from 15757d8 to f5c9ff8 Jun 2, 2019
@highfive highfive removed the S-tests-failed label Jun 2, 2019
@gterzian
Copy link
Member Author

gterzian commented Jun 2, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2019

Trying commit f5c9ff8 with merge 2e5e02d...

bors-servo added 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
Contributor

bors-servo commented Jun 2, 2019

💔 Test failed - linux-rel-wpt

@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 gterzian:improve_http_cache branch from 63e9b79 to 80515c4 Jun 3, 2019
@gterzian
Copy link
Member Author

gterzian commented Jun 3, 2019

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
Member

Manishearth commented Jun 14, 2019

r? @jdm

@gterzian gterzian force-pushed the gterzian:improve_http_cache branch from 80515c4 to 4f41065 Jun 17, 2019
@jdm
Copy link
Member

jdm commented Jun 17, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Jun 17, 2019

📌 Commit 4f41065 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jun 17, 2019

Testing commit 4f41065 with merge b04b449...

bors-servo added 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
Contributor

bors-servo commented Jun 17, 2019

💔 Test failed - linux-rel-wpt

@gterzian
Copy link
Member Author

gterzian commented Jun 19, 2019

{
    "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...

@gterzian
Copy link
Member Author

gterzian commented Jun 19, 2019

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

@gterzian gterzian mentioned this pull request Jun 19, 2019
0 of 5 tasks complete
@gterzian
Copy link
Member Author

gterzian commented Jun 22, 2019

@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
Copy link
Member

jdm commented Jun 22, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2019

📌 Commit 689b797 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2019

Testing commit 689b797 with merge 5592682...

bors-servo added 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
Contributor

bors-servo commented Jun 22, 2019

☀️ 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
4 checks passed
4 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@gterzian gterzian deleted the gterzian:improve_http_cache branch Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.