aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/response.rs
Commit message (Collapse)AuthorAgeFilesLines
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-3/+9
|
* Reset to in-memory stream with empty byte sequence for None init bodycybai2023-04-271-0/+5
| | | | | | | Because the response body stream is initialized with FetchResponse, it cannot be processed with in-memory empty sequence. Thus, instead of using the FetchResponse stream, we'll reset it to Memory body stream with empty byte sequence if there's no init body.
* Update steps comment to match latest (2023-04-14) speccybai2023-04-141-21/+8
|
* Respect MIME type from headers instead of caching itcybai2023-04-131-5/+2
|
* Upgrade HyperNaveen Gattu2022-01-161-1/+1
|
* concept-response-clone: Ensure header guard is cloned after headersNaveen Gattu2021-12-171-1/+1
| | | | | | | | | | | | | | | | | | | https://fetch.spec.whatwg.org/#concept-response-clone If the header guard of the response to clone is `immutable`, then copying the headers to the new response will fail with `Guard is immutable` unless we ensure the guard is copied _after_ the headers. https://github.com/servo/servo/blob/8650794391729c6fee34bc2644ccbb85bd8fd58d/components/script/dom/response.rs#L331-L334 fn Append(&self, name: ByteString, value: ByteString) -> ErrorResult { // Step 1 let value = normalize_value(value); // Step 2 let (mut valid_name, valid_value) = validate_name_and_value(name, value)?; valid_name = valid_name.to_lowercase(); // Step 3 if self.guard.get() == Guard::Immutable { return Err(Error::Type("Guard is immutable".to_string())); }
* integrate readablestream with fetch and blobGregory Terzian2020-06-041-57/+59
|
* Fix the webidl for HeadersBastien Orivel2020-05-301-4/+2
| | | | | | Make the HeadersInit type match the spec. Fixes #26441
* update rust toolchainKunal Mohan2020-05-211-1/+1
|
* Fix the redirected attribute for ResponseBastien Orivel2020-05-051-0/+6
|
* Strip request-body-header when redirecting from a POST to GETBastien Orivel2020-05-051-2/+1
| | | | | | | | This doesn't change any expectation because we're not setting response.redirected properly so all the tests fail later on when it's asserted to be true. Fixes #25257
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-5/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Add accountable-refcell as optional build time featureKunal Mohan2020-01-081-2/+2
|
* Add StreamConsumer wrapper and methods to responseRidhim Rastogi2019-12-031-0/+17
|
* Set response mime_type based on Content-Typeglowe2019-11-141-0/+1
| | | | | | | Set the response's mime_type based on its Content-Type header whenever Response::set_headers is called. Fixes #24628.
* Auto merge of #24379 - PeaceRebel:dom_response_check_opaque_filter, r=jdmbors-servo2019-10-111-0/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dom response check opaque filter <!-- Please describe your changes on the following line: --> Added setters for url_list, status, and body in `Response`. Response members are set for [Network Error](https://fetch.spec.whatwg.org/#concept-network-error), [Opaque](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) and [Opaque-redirect](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect) responses. --- <!-- 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 #24372 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24379) <!-- Reviewable:end -->
| * Set DOM response members as per the spec for opaque, opaque-redirect and ↵peacerebel2019-10-111-0/+28
| | | | | | | | | | | | error responses Signed-off-by: Bipin <peacerebel@protonmail.com>
* | response: remove text from default statusCodeOtávio Pace2019-10-071-2/+2
|/ | | | | | | According to the specification the text of the default statusCode should be empty. Reference: https://fetch.spec.whatwg.org/#concept-response-status-message
* Remove now-unnecessary must_root and allow(unrooted_must_root) annotationsManish Goregaokar2019-01-041-5/+0
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-6/+8
|
* `cargo fix --edition`Simon Sapin2018-11-061-15/+15
|
* Update hyper to 0.12Bastien Orivel2018-11-011-6/+6
|
* Format script componentchansuke2018-09-191-23/+52
|
* feat(webidl): expose arraybuffer overload in body idlOJ Kwon2018-03-231-0/+6
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Replace uses of libcore with libstd in components/scriptSimon Sapin2017-10-161-2/+1
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-7/+7
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-17/+17
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Untry scriptSimon Sapin2017-06-181-5/+5
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Use the API base URL in Fetch APIs.Ms2ger2016-12-191-2/+1
|
* Remove HeapGCValueAnthony Ramine2016-12-121-2/+2
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-1/+1
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Implement range index with the Position enum on ServoUrlPu Xingyu2016-11-181-1/+1
|
* Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-7/+7
|
* Implement response API Clone step 1Atte Lautanala2016-10-231-1/+3
|
* Make Response's `Clone()` method to clone headers.Jeena Lee2016-10-211-1/+2
| | | | | | This patch allows the response clone to have the same headers list as the original's. Previously, only the cloned response's headers guard was set to be the same as the original response's headers guard.
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-2/+2
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-9/+7
|
* Introduce GlobalScope::get_urlAnthony Ramine2016-10-061-2/+3
|
* Introduce Reflectable::global_scopeAnthony Ramine2016-10-061-2/+2
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-6/+7
|
* Provide the fetched data to fetch() consumers.Ms2ger2016-10-061-5/+24
|
* Revert "Make DOMRefCell use style’s copy of RefCell"Simon Sapin2016-10-041-1/+1
| | | | This reverts commit ec723057b2360446790d436fe5e234d798fb4175.
* Implement the Fetch methodJeena Lee2016-09-291-0/+23
|