mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Merge pull request #2631 from Manishearth/xhr-spaces
Fix field-value checking to not throw for lone spaces; r=jdm
This commit is contained in:
commit
ab711fcf0c
1 changed files with 15 additions and 1 deletions
|
@ -94,7 +94,21 @@ impl ByteString {
|
|||
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 {
|
||||
prev = SPHT;
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue