Repository navigation
Make fetch happen - #11556
Make fetch happen#11556
Conversation
|
Heads up! This PR modifies the following files:
|
|
Latest wpt results: http://hastebin.com/jigerupena.sm Of those 15 unexpected, 4 are unexpected passes The timeouts are due to response body progress, which hasn't been implemented properly yet. I'd like to wait for SharedIPCMemory to be viable before doing this, but it might just be better to switch back to sending bytes across. Other failures are due to:
|
|
Updating unit tests and tidying will need to be done at some point. I will review regardless. |
|
Right, I'll be doing that eventually. I'm focusing on wpt right now |
|
-S-awaiting-review
|
|
☔ The latest upstream changes (presumably #11468) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Review status: 10 of 14 files reviewed at latest revision, 20 unresolved discussions, some commit checks failed. components/net/resource_thread.rs, line 503 [r2] (raw file):
|
|
Thinking about the data chunks, there's a bit of a dilemma in sending them across. Initially, I was thinking of passing However, this isn't so straightforward:
I see two solutions to this. The first is to not follow the spec exactly. We figure out whether or not this is the last fetch before spawning the fetch worker, and only then spawn the worker, triggering process_response right before. Proposed heuristic would involve checking if done_chan is Some (this skips cors preflights), and checking that the response status (which we know before creating the fetch worker) is not a redirect. I think this will work. But it feels brittle to me. Advantages:
Disadvantages:
The second is simpler -- the buffered data is sent down through done_chan, which is changed to have Payload/Done messages, and the step in the main fetch thread which waits on done_chan instead proxies the payload messages through process_response_chunk Advantages:
Disadvantage:
(There's a third solution which does some extra signalling with a bidirectional done_chan, but I'm not very fond of it since it's confusing and has no advantages) I prefer the second solution, since I think we can get rid of the excessive copying when we make it use IPCSharedMemory later. @jdm, what do you think? |
|
Unused commit: 23a2598, replaces target with an Arc. Unnecessary for now. |
ba56787 to
ac660f2
Compare
|
Added support for chunks. progress-based tests should pass now (need to check). Also got rid of fetch_done, we now instead just call process_response_* at the end of a sync fetch
|
|
Two timeouts fixed, one new test passes: http://hastebin.com/wehuvademu.sm 14 more to go |
|
The "expected |
|
The latest commit adds support for modifying headers, including the host header, but it also adds the accept headers. The spec says
so I might need to tweak that further |
6871287 to
a92bddf
Compare
|
Gzip fixed. Somehow send-usp times out when run with other tests in parallel, but not on its own. Tried to rebase over Rebecca's referrer changes; however I'm unable to cross layout (it gets stuck at LLVM module passes). The branch is https://github.com/Manishearth/servo/tree/make-fetch-happen-rebase if anyone wants to try it out. |
bbb4488 to
5fd1df8
Compare
|
Need to figure out why headers are disappearing on redirect |
|
And now 4 (of which one is spurious -- that test shouldn't have passed in the first place): https://gist.github.com/Manishearth/3a547954ed0dac4f6288004fdc39fe62 Not sure why the shift-jis charset thing is failing |
|
💔 Test failed - linux-rel |
|
|
💔 Test failed - mac-rel-css |
|
|
💔 Test failed - mac-rel-css |
|
@bors-servo retry
|
|
💔 Test failed - mac-rel-css |
|
@bors-servo: retry
|
|
💔 Test failed - mac-rel-wpt |
|
|
💔 Test failed - mac-rel-wpt |
|
|
⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, windows are reusable. Rebuilding only mac-rel-wpt... |
|
💔 Test failed - mac-rel-wpt |
|
|
⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, windows are reusable. Rebuilding only mac-rel-wpt... |
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows |
|
@Manishearth this change seems to have introduced:
|
|
Yes. We filed #11760 to deal with it. |
Moves XHR over to the fetch backend.
Previous PR: #11439
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors (Will fix later)This change is