Files
moli/moli-webapi/src/headers.rs
T
ldm0 3fd5d337c5 fix(fetch): honor byte ranges in blob URL responses
Resolve single ranges against captured Blob bytes for Window and Worker Fetch
and XHR, including partial response headers and integrity verification. Reject
malformed or unsatisfiable ranges and normalize author headers before CORS
preflight and context overrides so repeated ranges cannot lose earlier values
or skip preflight.

Cover byte boundaries, cloned and revoked URL entries, empty and binary bodies,
request guards, synchronous XHR, and partial-body integrity. Add the two passing
Blob range WPT cases to the verified catalogue.
2026-11-24 14:30:19 +08:00

25 lines
884 B
Rust

mod bindings;
mod methods;
mod store;
use moli_v8_util::{throw_type_error, v8_string};
pub use self::bindings::headers_constructor_callback;
pub use self::methods::install_headers_template_bindings;
pub use self::store::headers_entries;
pub use self::store::{HeadersGuard, combined_headers_entries, filter_headers_for_guard};
pub use self::store::{
build_headers_object, build_headers_object_with_state, headers_entries_from_init, headers_list,
mark_headers_immutable,
};
pub fn clone_headers_object<'s>(
scope: &mut v8::PinScope<'s, '_>,
original: v8::Local<'s, v8::Object>,
) -> v8::Local<'s, v8::Object> {
let entries = headers_list(scope, original);
let guard = self::store::headers_guard(scope, original);
let immutable = self::store::headers_are_immutable(scope, original);
build_headers_object_with_state(scope, &entries, guard, immutable)
}