mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
LibWeb: Ensure that contentType in Blob::slice is basic latin
This commit is contained in:
parent
a9e37be7a0
commit
7f6a49c085
1 changed files with 6 additions and 4 deletions
|
@ -230,10 +230,12 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::slice(Optional<i64> start, Opt
|
||||||
} else {
|
} else {
|
||||||
// b. Else let relativeContentType be set to contentType and run the substeps below:
|
// b. Else let relativeContentType be set to contentType and run the substeps below:
|
||||||
|
|
||||||
// FIXME: 1. If relativeContentType contains any characters outside the range of U+0020 to U+007E, then set relativeContentType to the empty string and return from these substeps.
|
// 1. If relativeContentType contains any characters outside the range of U+0020 to U+007E, then set relativeContentType to the empty string and return from these substeps.
|
||||||
|
// NOTE: contentType is set to empty string at declaration.
|
||||||
// 2. Convert every character in relativeContentType to ASCII lowercase.
|
if (is_basic_latin(content_type.value())) {
|
||||||
relative_content_type = TRY_OR_THROW_OOM(vm, Infra::to_ascii_lowercase(content_type.value()));
|
// 2. Convert every character in relativeContentType to ASCII lowercase.
|
||||||
|
relative_content_type = TRY_OR_THROW_OOM(vm, Infra::to_ascii_lowercase(content_type.value()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Let span be max((relativeEnd - relativeStart), 0).
|
// 4. Let span be max((relativeEnd - relativeStart), 0).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue