Commit graph

833 commits

Author SHA1 Message Date
Anthony Ramine
1854566683 Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)
A cargo bump and a switch to serde_derive is needed to do this rustup.
2016-10-09 18:53:47 +02:00
bors-servo
b1d8eff467 Auto merge of #13411 - frewsxcv:mime, r=jdm
Migrate mime_classifier top-level string to enum.

I made this branch months ago and forgot about it. Instead of just throwing the changes away, I rebased off origin/master and opened this pull request. If these changes aren't desired, no feelings hurt, just close this. If they are desired, let me know if there are any changes you want me to make and I'll also need to rewrite/squash the commits.

<!-- 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/13411)
<!-- Reviewable:end -->
2016-10-08 15:40:47 -05:00
Corey Farwell
349e01f6eb Fix capitalization for enum variants. 2016-10-08 15:48:18 -04:00
Corey Farwell
66303e40b5 Migrate mime_classifier top-level string to enum. 2016-10-08 15:41:58 -04:00
Jan Zerebecki
95a7482d26 Remove same-origin-data-url flag from fetch implementation
The spec removed it. Check the scheme instead, data is always same origin now,
except for workers.
This also updates the comments to make step numbers match the spec.
Closes #13362
2016-10-01 00:27:03 -07:00
Alan Jeffrey
a74fe58563 Moved pub_domains to net_traits and did a spring clean. 2016-09-29 17:28:47 -05:00
Ms2ger
ccfd977076 Avoid a possible deadlock in main_fetch's synchronous code.
On playpen, similar code caused a deadlock on 1.11 stable, and worked fine
on nightly 1.13; it seems safer to avoid the pattern entirely.
2016-09-23 09:36:02 +02:00
Keith Yeung
6fbd2aa5b7 Avoid deadlock in main_fetch 2016-09-21 14:26:09 -07:00
Keith Yeung
07c9cfecec Add FetchMetadata and update corresponding methods 2016-09-21 14:26:03 -07:00
Corey Farwell
3aa2ec653a Don't require PathBuf ownership if we don't need it. 2016-09-16 23:11:04 -04:00
bors-servo
8ccfffaa77 Auto merge of #13294 - 6112:referrer-typo-fix, r=jdm
Fix most typoes for: "referer" -> "referrer"

Replace most uses of the word "referer" with "referrer", except for `hyper::header::Referer`. Also update the unit tests to compile & pass after those changes.

---
<!-- 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 #13286

<!-- Either: -->
- [ ]  There are tests for these changes OR
- [X] These changes do not require tests because they're only typo fixes.

<!-- 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/13294)
<!-- Reviewable:end -->
2016-09-16 15:43:54 -05:00
Nicolas
924136ee0c Fix most typoes for: "referer" -> "referrer" 2016-09-16 12:40:17 -04:00
Bryan Gilbert
0bcd04d2ab store basic auth in cache on redirect response 2016-09-15 22:08:52 -04:00
Bryan Gilbert
82e45a403f updated basic auth cache to key off of url origin 2016-09-15 22:08:52 -04:00
zakorgyula
f4fda68409 Annotations for requestDevice, request_bluetooth_devices and matches_filter functions 2016-09-14 08:41:03 +02:00
zakorgyula
359548f607 requestDevice update 2016-09-14 08:41:02 +02:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
bors-servo
5a5a76cc5d Auto merge of #13058 - malisas:malisa-responseAPI, r=Manishearth,jdm
Response API

<!-- Please describe your changes on the following line: -->
This PR adds the [dom::Response](https://fetch.spec.whatwg.org/#response-class) implementation and addresses #11896.

The relevant passing tests` expectations have been updated.

In order to allow non-UTF-8-encoded status messages, `net_traits::response::Response`'s `raw_status` field has been changed from type [`Option<RawStatus>`](https://doc.servo.org/hyper/http/struct.RawStatus.html) to type `Option<(u16, Vec<u8>)>`. As a result, a few other files which rely on the `raw_status` field were affected and updated.

TODOs:
- The `body` and `trailer` methods. Relies on implementation of `ReadableStream` and `Promise`s.
- Similarly, replace the dummy constructor `_body: Option<USVString>` argument with `body: ResponseBodyInit`.
- Currently, whenever `r's response's header list` or `r's Headers object` are mentioned, I always modify the `headers_reflector` field (of type dom::Headers, or `r's Headers object`) and not the corresponding hyper::Headers list in the net_traits::Response field. A completely accurate interpretation of the spec might consider making both of these lists the same thing via a reference. [Discussion](https://github.com/whatwg/fetch/issues/358) was [had](https://github.com/servo/servo/pull/12884).

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/13058)
<!-- Reviewable:end -->
2016-09-08 18:58:05 -05:00
Malisa Smith
faf32a7cfb dom::Response implementation 2016-09-06 19:58:32 -07:00
Attila Dusnoki
ccc66d0c32 WebBluetooth Android support 2016-09-06 12:48:04 +02:00
bors-servo
f66382f75c Auto merge of #13071 - wdv4758h:cors_preflight_fetch, r=jdm
Solved wrong referrer policy in cors_preflight_fetch

Solved wrong referrer policy in cors_preflight_fetch

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13026
- [X] There are tests for these changes

<!-- 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/13071)
<!-- Reviewable:end -->
2016-08-27 05:20:46 -05:00
Chiu-Hsiang Hsu
3c93ced76a Solved wrong referrer policy in cors_preflight_fetch 2016-08-27 16:02:23 +08:00
bors-servo
b399fcb54b Auto merge of #13069 - hsinewu:#13025, r=jdm
pass request value instead of constant

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #13025

<!-- Either: -->
- [X] These changes do not require tests because stated in the issue

<!-- 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/13069)
<!-- Reviewable:end -->
2016-08-26 23:07:34 -05:00
hsinewu
1db1a7671e pass request value instead of constant 2016-08-27 12:03:49 +08:00
Zhen Zhang
2527dc07f2 Burn SelectedFileId in fire 2016-08-22 10:05:01 +02:00
Anthony Ramine
03a0170c91 Update to webrender 0.4.0 2016-08-18 19:33:12 +02:00
Zhen Zhang
cd9fc4919d Improve File API related comments 2016-08-17 11:06:25 +02:00
Anthony Ramine
6cc862d0c6 Lessen pressure on the thread-local RNG
When loading HTTP requests, initialise the request ID only if devtools
are used, to lessen the pressure put on the RNG initialisation.

This tentatively fixes #11100 on OS X.
2016-08-16 10:12:33 +02:00
Anthony Ramine
fc6faf72ee Update Rust to 1.12.0-nightly (1deb02ea6 2016-08-12) 2016-08-13 18:34:44 +02:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Glenn Watson
db8c3ef727 Update cargo.lock for wr2, pin ipc-channel. 2016-08-03 10:44:10 +02:00
Zhen Zhang
17ae38a318 Add cancellability to file manager load and related refactoring 2016-08-02 23:51:51 +02:00
bors-servo
93b130f3f7 Auto merge of #12579 - izgzhen:fix-fileapi-ref, r=Manishearth
Fix FileAPI's refcount implementation

Revise several intricate parts of FileAPI's internal refcounting-related implementation.

Goal: Get it done right once and for all.

r? @Manishearth

<!-- Please describe your changes on the following line: -->

---
<!-- 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 do not require tests because it is internal logic change

<!-- 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/12579)
<!-- Reviewable:end -->
2016-08-02 03:03:47 -05:00
ddh
db808ca75d Added devtools support to fetch for XHR + Manish's XHR ident fix
added unit test for request fetch with devtools

added devtools/fetch test
2016-07-29 11:20:38 +01:00
bors-servo
45209b7ffe Auto merge of #12538 - szeged:error-refactor, r=nox
Refactor Bluetooth error handling

<!-- Please describe your changes on the following line: -->
Replace the error messages with an enum in `net/bluetooth_thread.rs`. Rename `bluetooth_blacklist.rs` to `bluetooth_utils.rs` and put the error conversion in it.
With this the returned errors in DOM classes follow the specification.
<!-- 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 do not require tests because  there is no Web Bluetooth test API implementation yet.

<!-- 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/12538)
<!-- Reviewable:end -->
2016-07-28 03:33:08 -05:00
mrmiywj
a2b6c3a0da send requests that are redirected to devtools
add unit test
2016-07-27 22:57:25 +08:00
zakorgy
b4db14471b Refactor Bluetooth error handling 2016-07-27 15:02:01 +02:00
Anthony Ramine
8d919c5c1f Remove use of util::opts from storage_thread 2016-07-27 10:25:48 +02:00
Anthony Ramine
1662e292d8 Remove use of util::opts from resource_thread 2016-07-27 10:22:06 +02:00
Zhen Zhang
9c8ebd3ce1 Chunked ReadFile from file manager 2016-07-25 19:39:16 +02:00
Zhen Zhang
49ed453a59 Fix FileAPI's refcount implementation 2016-07-25 17:48:03 +02:00
UK992
06142b37b8 Support tinyfiledialogs on Windows 2016-07-25 14:43:06 +02:00
bors-servo
1e835e330d Auto merge of #12539 - johannhof:error-page, r=jdm
Improve page load error information

Fixes #8640.

This commit adds a neterror page that displays really really basic
information about what went wrong with your request, which is an
improvement over the current state of blank page.

It also fixes the problem of certificate validation errors not
triggering the cert error page, since for some reason the function
string seems to have turned lowercase.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #8640.

- [x] These changes do not require tests because I'm not sure how to test this, suggestions welcome!

r?@jdm

<!-- 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/12539)
<!-- Reviewable:end -->
2016-07-21 13:27:06 -05:00
Johann Hofmann
8e3593aa67
Improve page load error information
Fixes #8640.

This commit adds a neterror page that displays really really basic
information about what went wrong with your request, which is an
improvement over the current state of blank page.

It also fixes the problem of certificate validation errors not
triggering the cert error page, since for some reason the function
string seems to have turned lowercase.
2016-07-21 16:06:13 +02:00
Manish Goregaokar
ceb85795b1
Use Result instead of panicking when the resource dir can't be found 2016-07-21 12:07:25 +05:30
Rahul Sharma
eff3e01df0 make resource_thread talk to sw-manager 2016-07-18 19:06:48 +05:30
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30
bors-servo
90f1e53fd2 Auto merge of #12464 - aneeshusa:cleanup-start-sending-sniffed, r=Wafflespeanut
Remove fn start_sending_sniffed

<!-- Please describe your changes on the following line: -->

This function was not used, but more importantly encodes the bad
practice of a raw `.unwrap()` and therefore should not be used.

---
<!-- 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
- [ ] These changes reference #12462 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are a cleanup

<!-- 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/12464)
<!-- Reviewable:end -->
2016-07-15 13:22:49 -07:00
Aravind Gollakota
bfda32ea00 msg: Rename ReferrerPolicy::NoRefWhenDowngrade NoReferrerWhenDowngrade
This is more consistent with the other variants.
2016-07-15 08:13:57 -07:00
Aneesh Agrawal
cc2b2a85bd Remove fn start_sending_sniffed
This function was not used, but more importantly encodes the bad
practice of a raw `.unwrap()` and therefore should not be used.
2016-07-15 11:03:49 -04:00