зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #2631 - Fix field-value checking to not throw for lone spaces; r=jdm (from Manishearth:xhr-spaces)
Source-Repo: https://github.com/servo/servo Source-Revision: ab711fcf0cb0071a9df26af5aac4762a1281dc69
This commit is contained in:
Родитель
03c204ed90
Коммит
c6b665792f
|
@ -94,7 +94,21 @@ impl ByteString {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
32 | 9 => { // SP | HT
|
32 => { // SP
|
||||||
|
if prev == LF || prev == SPHT {
|
||||||
|
prev = SPHT;
|
||||||
|
true
|
||||||
|
} else if prev == Other {
|
||||||
|
// Counts as an Other here, since it's not preceded by a CRLF
|
||||||
|
// SP is not a CTL, so it can be used anywhere
|
||||||
|
// though if used immediately after a CR the CR is invalid
|
||||||
|
// We don't change prev since it's already Other
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
9 => { // HT
|
||||||
if prev == LF || prev == SPHT {
|
if prev == LF || prev == SPHT {
|
||||||
prev = SPHT;
|
prev = SPHT;
|
||||||
true
|
true
|
||||||
|
|
Загрузка…
Ссылка в новой задаче