Skip to content

Use unfiltered response body when replicating body of cached responses. - #24356

Merged
bors-servo merged 2 commits into
masterfrom
jdm-patch-30
Oct 4, 2019
Merged

bors-servo merged 2 commits into
masterfrom
jdm-patch-30

Conversation

@jdm

@jdm jdm commented Oct 3, 2019 •

Copy link
Copy Markdown
Member

The amount of time it took me to track this down makes me wonder if there would be a better way of representing response bodies and filtered responses.



This change is Reviewable

@highfive

highfive commented Oct 3, 2019

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

@highfive

highfive commented Oct 3, 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 Oct 3, 2019
@jdm

jdm commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

bors-servo pushed a commit that referenced this pull request Oct 3, 2019
Use unfiltered response body when replicating body of cached responses.

The amount of time it took me to track this down makes me wonder if there would be a better way of representing response bodies and filtered responses.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24350
- [ ] There are tests for these changes

<!-- 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/24356)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit d8cdc71 with merge d1ad481...

@jdm

jdm commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

To test this specifically, we would require:

  • a response which is cached where the response gets filtered
  • before that response finishes, another request for the same resource needs to be initiated

Before these changes, the second request would hang because the code that runs when the first response is complete looks at the filtered body, not the unfiltered one. After these changes the second request should observe the complete cached response after the first request is complete.

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
State: approved= try=True

@CYBAI

CYBAI commented Oct 3, 2019

Copy link
Copy Markdown
Member

if there would be a better way of representing response bodies and filtered responses.

Sounds like we can create different types with Phantom Type to me 👀 Like the valid form example in Haskell.

@paulrouget

Copy link
Copy Markdown
Contributor

r=me with mach fmt.

@jdm

jdm commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

@bors-servo r=paulrouget

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 2156ed7 has been approved by paulrouget

@highfive highfive assigned paulrouget and unassigned nox Oct 3, 2019
@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 Oct 3, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2156ed7 with merge 2d463f0...

bors-servo pushed a commit that referenced this pull request Oct 3, 2019
Use unfiltered response body when replicating body of cached responses.

The amount of time it took me to track this down makes me wonder if there would be a better way of representing response bodies and filtered responses.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24350
- [ ] There are tests for these changes

<!-- 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/24356)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@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 Oct 3, 2019
@CYBAI

CYBAI commented Oct 3, 2019

Copy link
Copy Markdown
Member

@jdm

jdm commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2156ed7 with merge d96e692...

bors-servo pushed a commit that referenced this pull request Oct 3, 2019
Use unfiltered response body when replicating body of cached responses.

The amount of time it took me to track this down makes me wonder if there would be a better way of representing response bodies and filtered responses.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24350
- [ ] There are tests for these changes

<!-- 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/24356)
<!-- Reviewable:end -->
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Oct 3, 2019
@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 3, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@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 Oct 3, 2019
@jdm

jdm commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2156ed7 with merge bbc94d2...

bors-servo pushed a commit that referenced this pull request Oct 3, 2019
Use unfiltered response body when replicating body of cached responses.

The amount of time it took me to track this down makes me wonder if there would be a better way of representing response bodies and filtered responses.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24350
- [ ] There are tests for these changes

<!-- 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/24356)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 3, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: paulrouget
Pushing bbc94d2 to master...

@bors-servo
bors-servo merged commit 2156ed7 into master Oct 4, 2019
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 4, 2019
jdm added a commit to jdm/servo that referenced this pull request Oct 4, 2019
@jdm jdm mentioned this pull request Oct 4, 2019
3 tasks done
bors-servo pushed a commit that referenced this pull request Oct 7, 2019
Cache crossorigin test

This adds a test for #24356 to ensure that we don't regress our cache behaviour.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/24370)
<!-- Reviewable:end -->
@SimonSapin
SimonSapin deleted the jdm-patch-30 branch December 12, 2019 11:02
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.

Babylon.js mansion demo doesn't load

6 participants