Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTest setting response.body and fetching a message on a server #9321
Conversation
| @@ -422,7 +422,7 @@ pub struct StreamedResponse<R: HttpResponse> { | |||
| impl<R: HttpResponse> Read for StreamedResponse<R> { | |||
| #[inline] | |||
| fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { | |||
| match self.decoder { | |||
| match self.decoder { | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nikkisquared
Jan 14, 2016
Author
Contributor
yep, whoops, I caught and fixed that before, but then I must've accidentally undone it when I was trying to fix a different mistake I made. for some reason test-tidy doesn't catch it (assuming it's supposed to be unhappy about spaces not divisible by 4)
|
r? @jdm or @Manishearth |
|
Make the requested change, then squash please! |
| @@ -42,3 +42,25 @@ fn test_fetch_response_is_not_network_error() { | |||
| panic!("fetch response shouldn't be a network error"); | |||
| } | |||
| } | |||
|
|
|||
| // TODO this test requires response body to be set by Fetch | |||
This comment has been minimized.
This comment has been minimized.
| let _ = server.close(); | ||
|
|
||
| match fetch_response.body { | ||
| ResponseBody::Receiving(body) | ResponseBody::Done(body) => { |
This comment has been minimized.
This comment has been minimized.
f349d3c
to
68fa9d3
|
@bors-servo r=jdm |
|
|
Test setting response.body and fetching a message on a server I've updated http_fetch to now set response.body, as well as written a test to ensure that fetch can retrieve a message on a server. I've also looked into partially implementing some more of http_fetch while trying to figure out where response.body gets written to. As always I'd like feedback on my logic, I'm confident there are more steps for handling response.body I need but I find the specification difficult to parse on this. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9321) <!-- Reviewable:end -->
|
|
| @@ -304,7 +306,8 @@ fn http_fetch(request: Rc<Request>, | |||
| // Step 3 | |||
| if !request.skip_service_worker.get() && !request.is_service_worker_global_scope { | |||
|
|
|||
| // TODO: Substep 1 (handle fetch unimplemented) | |||
| // Substep 1 | |||
This comment has been minimized.
This comment has been minimized.
|
|
68fa9d3
to
4165786
|
I've rebased the branch on upstream/master so it includes #9362 ! And I've made sure to run test-tidy so I don't miss any more whitespace mistakes. |
|
@bors-servo r=jdm |
|
|
Test setting response.body and fetching a message on a server I've updated http_fetch to now set response.body, as well as written a test to ensure that fetch can retrieve a message on a server. I've also looked into partially implementing some more of http_fetch while trying to figure out where response.body gets written to. As always I'd like feedback on my logic, I'm confident there are more steps for handling response.body I need but I find the specification difficult to parse on this. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9321) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
|
|
nikkisquared commentedJan 14, 2016
I've updated http_fetch to now set response.body, as well as written a test to ensure that fetch can retrieve a message on a server. I've also looked into partially implementing some more of http_fetch while trying to figure out where response.body gets written to.
As always I'd like feedback on my logic, I'm confident there are more steps for handling response.body I need but I find the specification difficult to parse on this.