зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #11824 - Use get_mut instead of get-remove-set in XHR send() (from DarinM223:master); r=KiChjang
<!-- Please describe your changes on the following line: --> Mutates the header directly with get_mut instead of using get(), remove(), and set(). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11811 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because there are existing web tests <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: a3f43076b6b30491dcb4d9b8cc1ae32261a82f99
This commit is contained in:
Родитель
82df62fcd8
Коммит
cb4941f6d7
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
hyper = { version = "0.9", features = [ "serde-serialization" ] }
|
||||
hyper = { version = "0.9.9", features = [ "serde-serialization" ] }
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
|
|
|
@ -12,7 +12,7 @@ path = "lib.rs"
|
|||
bitflags = "0.7"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
hyper = {version = "0.9", features = ["serde-serialization"]}
|
||||
hyper = {version = "0.9.9", features = ["serde-serialization"]}
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
msg = {path = "../msg"}
|
||||
serde = "0.7.11"
|
||||
|
|
|
@ -15,7 +15,7 @@ cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
|
|||
euclid = "0.7.1"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
hyper = {version = "0.9", features = ["serde-serialization"]}
|
||||
hyper = {version = "0.9.9", features = ["serde-serialization"]}
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
|
||||
plugins = {path = "../plugins"}
|
||||
|
|
|
@ -16,7 +16,7 @@ cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ]
|
|||
device = {git = "https://github.com/servo/devices"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
flate2 = "0.2.0"
|
||||
hyper = {version = "0.9", features = ["serde-serialization"]}
|
||||
hyper = {version = "0.9.9", features = ["serde-serialization"]}
|
||||
immeta = "0.3.1"
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
lazy_static = "0.2"
|
||||
|
|
|
@ -14,7 +14,7 @@ msg = {path = "../msg"}
|
|||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
hyper = { version = "0.9", features = [ "serde-serialization" ] }
|
||||
hyper = { version = "0.9.9", features = [ "serde-serialization" ] }
|
||||
image = "0.10"
|
||||
lazy_static = "0.2"
|
||||
log = "0.3.5"
|
||||
|
|
|
@ -32,7 +32,7 @@ gfx_traits = {path = "../gfx_traits"}
|
|||
heapsize = "0.3.6"
|
||||
heapsize_plugin = "0.1.2"
|
||||
html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]}
|
||||
hyper = {version = "0.9", features = ["serde-serialization"]}
|
||||
hyper = {version = "0.9.9", features = ["serde-serialization"]}
|
||||
image = "0.10"
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
js = {git = "https://github.com/servo/rust-mozjs"}
|
||||
|
|
|
@ -635,7 +635,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
}
|
||||
|
||||
if !content_type_set {
|
||||
let ct = request.headers.get::<ContentType>().map(|x| x.clone());
|
||||
let ct = request.headers.get_mut::<ContentType>();
|
||||
if let Some(mut ct) = ct {
|
||||
if let Some(encoding) = encoding {
|
||||
for param in &mut (ct.0).2 {
|
||||
|
@ -646,10 +646,6 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
}
|
||||
}
|
||||
}
|
||||
// remove instead of mutate in place
|
||||
// https://github.com/hyperium/hyper/issues/821
|
||||
request.headers.remove_raw("content-type");
|
||||
request.headers.set(ct);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -501,7 +501,7 @@ name = "devtools"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"devtools_traits 0.0.1",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
|
@ -520,7 +520,7 @@ dependencies = [
|
|||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"msg 0.0.1",
|
||||
"serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -973,7 +973,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.9.6"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1374,7 +1374,7 @@ dependencies = [
|
|||
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
|
||||
"plugins 0.0.1",
|
||||
|
@ -1397,7 +1397,7 @@ dependencies = [
|
|||
"device 0.0.1 (git+https://github.com/servo/devices)",
|
||||
"devtools_traits 0.0.1",
|
||||
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"immeta 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1444,7 +1444,7 @@ dependencies = [
|
|||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"devtools_traits 0.0.1",
|
||||
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
|
@ -1464,7 +1464,7 @@ dependencies = [
|
|||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1913,7 +1913,7 @@ dependencies = [
|
|||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"js 0.1.3 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
@ -2555,7 +2555,7 @@ name = "webdriver"
|
|||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2567,7 +2567,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2630,7 +2630,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
euclid = "0.7.1"
|
||||
hyper = "0.9"
|
||||
hyper = "0.9.9"
|
||||
image = "0.10"
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
log = "0.3.5"
|
||||
|
|
|
@ -460,7 +460,7 @@ name = "devtools"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"devtools_traits 0.0.1",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
|
@ -479,7 +479,7 @@ dependencies = [
|
|||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"msg 0.0.1",
|
||||
"serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -882,7 +882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.9.6"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1276,7 +1276,7 @@ dependencies = [
|
|||
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"layers 0.2.6 (git+https://github.com/servo/rust-layers)",
|
||||
"plugins 0.0.1",
|
||||
|
@ -1299,7 +1299,7 @@ dependencies = [
|
|||
"device 0.0.1 (git+https://github.com/servo/devices)",
|
||||
"devtools_traits 0.0.1",
|
||||
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"immeta 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1345,7 +1345,7 @@ dependencies = [
|
|||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1767,7 +1767,7 @@ dependencies = [
|
|||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"js 0.1.3 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
@ -2417,7 +2417,7 @@ name = "webdriver"
|
|||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2429,7 +2429,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2492,7 +2492,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -13,7 +13,7 @@ content-blocker = "0.2"
|
|||
cookie = "0.2"
|
||||
devtools_traits = {path = "../../../components/devtools_traits"}
|
||||
flate2 = "0.2.0"
|
||||
hyper = "0.9"
|
||||
hyper = "0.9.9"
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
msg = {path = "../../../components/msg"}
|
||||
net = {path = "../../../components/net"}
|
||||
|
|
Загрузка…
Ссылка в новой задаче