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 upImplemented http fetch (partial #4576) #5824
Conversation
hoppipolla-critic-bot
commented
Apr 24, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/4785 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
\o/ |
|
@KiChjang Would you like feedback on anything specifically? |
|
|
|
Yes - I've been trying to destructure and extract the |
| @@ -71,6 +84,7 @@ pub struct Request { | |||
| pub preserve_content_codings: bool, | |||
| // pub client: GlobalRef, // XXXManishearth copy over only the relevant fields of the global scope, | |||
| // not the entire scope to avoid the libscript dependency | |||
| pub is_service_worker_global_scope: Option<bool>, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
KiChjang
Apr 24, 2015
Author
Member
This isn't actually from the spec, it's a workaround for the client (refer to the note you left on the line above).
This comment has been minimized.
This comment has been minimized.
Manishearth
Apr 24, 2015
Member
oh, I see.
I'll look through this sometime tomorrow I guess (got some changes to review in humpty_dumpty first)
|
Usually you want |
|
Sorry, somehow git messed up my changes, and one of my commits are gone. I'll have to rewrite some code and push it before I can answer. |
|
|
d49cfc5
to
e949b14
|
@KiChjang What feedback are you looking for here? Is this a PR that you would like to merge after review? |
|
Yes, since all the build errors are fixed, I'd like to merge this PR after reviews. |
|
-S-awaiting-review +S-needs-code-changes +S-needs-rebase Reviewed files:
components/net/fetch/request.rs, line 102 [r2] (raw file): components/net/fetch/request.rs, line 108 [r2] (raw file): components/net/fetch/request.rs, line 168 [r2] (raw file): components/net/fetch/request.rs, line 186 [r2] (raw file): components/net/fetch/request.rs, line 187 [r2] (raw file): components/net/fetch/request.rs, line 207 [r2] (raw file): components/net/fetch/request.rs, line 209 [r2] (raw file): let preflight_result = self.preflight_fetch();
if preflight_result.response_type == ResponseType::Error {
return Response::network_error();
}components/net/fetch/request.rs, line 225 [r2] (raw file): components/net/fetch/request.rs, line 231 [r2] (raw file): let fetch_result = self.http_network_or_cache_fetch(credentials, _authentication_fetch_flag);
if _cors_flag && self.cors_check(&fetch_result).is_err() {
return Response::network_error();
}
response = Some(fetch_result);components/net/fetch/request.rs, line 238 [r2] (raw file): components/net/fetch/request.rs, line 251 [r2] (raw file): components/net/fetch/request.rs, line 255 [r2] (raw file): components/net/fetch/request.rs, line 263 [r2] (raw file): let locationUrl = match locationUrl {
Ok(locationUrl) => locationUrl,
Err(_) => return Response::network_error(),
};components/net/fetch/request.rs, line 273 [r2] (raw file): components/net/fetch/request.rs, line 279 [r2] (raw file): components/net/fetch/request.rs, line 283 [r2] (raw file): components/net/fetch/request.rs, line 286 [r2] (raw file): components/net/fetch/request.rs, line 287 [r2] (raw file): components/net/fetch/request.rs, line 289 [r2] (raw file): components/net/fetch/request.rs, line 325 [r2] (raw file): components/net/fetch/request.rs, line 337 [r2] (raw file): components/net/fetch/request.rs, line 358 [r2] (raw file): components/net/fetch/request.rs, line 365 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/fetch/request.rs, line 108 [r2] (raw file): components/net/fetch/request.rs, line 325 [r2] (raw file): Comments from the review on Reviewable.io |
|
-S-awaiting-review -S-needs-rebase +S-needs-code-changes Reviewed files:
components/net/fetch/request.rs, line 255 [r2] (raw file): components/net/fetch/request.rs, line 258 [r3] (raw file): if ... {
return Response::network_error();
}components/net/fetch/request.rs, line 263 [r3] (raw file): components/net/fetch/request.rs, line 358 [r2] (raw file): components/net/fetch/request.rs, line 365 [r2] (raw file): components/net/fetch/request.rs, line 375 [r3] (raw file): if h.is::<ContentType>() {
...
} else {
h.is::<Accept>() || h.is::<AcceptLanguage>() || h.is::<ContentLanguage>()
}Comments from the review on Reviewable.io |
|
Review status: 0 of 1 files reviewed, 4 unresolved discussions, all commit checks successful. components/net/fetch/request.rs, line 146 [r4] (raw file): components/net/fetch/request.rs, line 148 [r4] (raw file): components/net/fetch/request.rs, line 267 [r2] (raw file): Changing the signature of Comments from the review on Reviewable.io |
|
components/net/fetch/request.rs, line 146 [r4] (raw file): components/net/fetch/request.rs, line 148 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 1 files reviewed, 4 unresolved discussions, all commit checks successful. components/net/fetch/request.rs, line 148 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed, 3 unresolved discussions, all commit checks successful.
components/net/fetch/request.rs, line 148 [r4] (raw file): components/net/fetch/request.rs, line 267 [r7] (raw file): if location.is_none() {
return Response::network_error();
}Comments from the review on Reviewable.io |
|
-S-awaiting-review +S-needs-squash Review status: all files reviewed, 2 unresolved discussions, all commit checks successful.
Comments from the review on Reviewable.io |
|
@bors-servo: r+ |
|
|
This is a work-in-progress for the implementation of HTTP fetch. Currently, it does not compile, as I haven't figured out how to solve the issues regarding borrows and lifetimes. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5824) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
KiChjang commentedApr 24, 2015
This is a work-in-progress for the implementation of HTTP fetch. Currently, it does not compile, as I haven't figured out how to solve the issues regarding borrows and lifetimes.