Commit graph

639 commits

Author SHA1 Message Date
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
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
Zhen Zhang
fdc3a8e3ac Put Blob URL online 2016-07-15 20:33:51 +08:00
bors-servo
4b78b9adab Auto merge of #12416 - canaltinova:referrer, r=jdm
Implement Document.referrer

<!-- 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 #12389 (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/12416)
<!-- Reviewable:end -->
2016-07-14 11:55:44 -07:00
Nazım Can Altınova
d6c1f7b5e3 Implement Document.referrer 2016-07-14 21:35:39 +03:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
bors-servo
665559556f Auto merge of #12406 - izgzhen:refactor-file, r=Manishearth
Refactor FileAPI implementation

Most are simple refactoring, cleanups and improvements, but still involving two slightly notable changes:

+ In `filemanager`, now we read the file content based on requested `RelativePos` by `seek` and `read_exact` (rather than `read_to_end` then do slicing). This strategy might be again adjusted in future performance tuning but certainly better than nothing.
+ Also, I cached more file meta-info in both sides and left a block of comment on `filemanager`'s file reading mentioning the snapshot-state problem (not solved now though).

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

<!-- 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/12406)
<!-- Reviewable:end -->
2016-07-12 22:00:08 -07:00
Zhen Zhang
aea99e081b Refactor FileAPI implementation 2016-07-13 12:12:32 +08:00
bors-servo
37dbb50208 Auto merge of #11978 - aravind-pg:new-referrer-pols, r=jdm
Add "origin" and "same-origin" referrer policies, replacing "origin-only".

<!-- 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 #11384
- [X] There are tests for these changes

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11978)
<!-- Reviewable:end -->
2016-07-12 13:44:33 -07:00
Zhen Zhang
0ff6f313e8 Add FileID validity setting/checking logic to Blob URL implementation 2016-07-11 10:51:55 +08:00
Zhen Zhang
5e051c08f6 Add ability to WPT-test file uploads and fetches, fixes #12322 2016-07-09 15:31:00 +08:00
Zhen Zhang
bf18225ba2 Spawn threads for requests in file manager and other style fixes 2016-07-08 19:57:02 +08:00
Aravind Gollakota
eeccb75fc1 net: Add "origin" and "same-origin" referrer policies, replacing "origin-only". 2016-07-08 00:01:24 -07:00
Anthony Ramine
e252793b1f Properly check storage size against QUOTA_SIZE_LIMIT (fixes #12247) 2016-07-06 14:01:25 +02:00
bors-servo
061cf054e7 Auto merge of #12260 - szeged:gattserverfunctions, r=jdm
Timeout for GATTServer's connect, disconnect methods.

<!-- Please describe your changes on the following line: -->
Added 30 seconds maximum timeout as specified in the bluetooth 4.2 https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=286439 (Vol. 3, page 480).
With this the existing `bluetooth_device_disconnect.html` test will work correctly.
It will not show the `connected:true` message, before the connection established, and will not show the `connected: false` message, before not disconnected from the GATT server.

---
<!-- 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 are 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12260)
<!-- Reviewable:end -->
2016-07-05 09:02:25 -07:00
Zhen Zhang
ab14777312 Remove DataSlice, fix #12249 2016-07-05 17:51:53 +08:00
zakorgy
441280989f Timeout for GATTServer's connect, disconnect methods. 2016-07-05 11:23:41 +02:00
bors-servo
36974f0746 Auto merge of #11875 - izgzhen:file-manager-backend, r=Manishearth
Integration and improvements of File API backends

Basically three major changes:

1. More complete origin check in `FileManagerThreadMsg`
2. Add reference counting logic to file manage store and script API
3. Integrate the support of slicing

r? @Manishearth

---
<!-- 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: -->
- [ ] 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11875)
<!-- Reviewable:end -->
2016-07-04 09:15:23 -07:00
Zhen Zhang
14d68968ed Integration and improvements of File API backends
1. More complete origin check in FileManagerThreadMsg
2. Add reference counting logic to file manage store and script API
3. Integrate the support of slicing
2016-07-04 23:02:03 +08:00
bors-servo
c8b048e368 Auto merge of #12050 - johannhof:brotli, r=jdm
Switch to a faster Brotli crate

<!-- 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 #11933.

<!-- Either: -->
- [x] These changes do not require tests (I hope) because no new behavior was introduced

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12050)
<!-- Reviewable:end -->
2016-07-03 18:32:15 -07:00
bors-servo
194fb3e199 Auto merge of #12190 - frewsxcv:mime-renaming, r=jdm
Minor MIME renaming and aliasing cleanup.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12190)
<!-- Reviewable:end -->
2016-07-03 11:07:12 -07:00
bors-servo
b0a8ce5341 Auto merge of #12178 - frewsxcv:prefs, r=emilio
Refactor `util::prefs` operations to be methods on static struct.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12178)
<!-- Reviewable:end -->
2016-07-03 08:19:04 -07:00
Corey Farwell
6c02a576cf Rename MIMEClassifier to match Rust acronym naming conventions.
e.g. `std::net::TcpStream`
2016-07-02 17:12:46 -04:00
Corey Farwell
749fe986aa Create type alias for MIME type. 2016-07-02 17:12:46 -04:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
Andre Silva
b10c3582d2 Remove unnecessary uses of unwrap in ImageCache::handle_cmd 2016-07-02 17:56:35 +01:00
Johann Hofmann
7890440d72
Switch to a faster Brotli crate 2016-07-01 20:15:32 +02:00
Alex Gaynor
a0f03dcfac Disable TLS compression
This prevents the CRIME attack.
2016-07-01 07:19:46 -04:00
bors-servo
305eda66dd Auto merge of #11932 - jdm:servoorg-cert, r=asajeffrey
Print out useful SSL-related information on SSL error page.

Make certificate error pages more useful. Attempt to identify known cases where upgrading OpenSSL would be useful.

<img width="553" alt="screen shot 2016-06-29 at 12 29 30 pm" src="4d07d5e2-3df5-11e6-94ab-cf061c0e64cc.png">

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11932)
<!-- Reviewable:end -->
2016-06-29 16:47:57 -05:00
Josh Matthews
94df389031 Print out useful SSL-related information on SSL error page. 2016-06-29 14:21:12 -04:00
Darin Minamoto
fc6e20f652 Use get_mut instead of get-remove-set in XHR send() 2016-06-27 21:31:28 -07:00
Anthony Ramine
38a79e4506 Update Rust to 1.11.0-nightly (ad7fe6521 2016-06-23)
I also properly bump any dependency related to the serde_macros removal
from webrender_traits
2016-06-27 14:13:44 +02:00
Dan Robertson
246723114f
Use common cookie struct add cookie webdriver cmds
One cookie struct to rule them all. One struct to represent them.
One cookie struct to bind them all, and through the IPC carry them.
2016-06-25 22:24:35 +00:00
bors-servo
6166d8e74f Auto merge of #11544 - jdm:privatebrowsing, r=asajeffrey
Implement private browsing for mozbrowser

<!-- Please describe your changes on the following line: -->
Support the `mozprivatebrowsing` attribute on mozbrowser iframes. This separates the non-private and private sessions in terms of cookies, HSTS lists, cached HTTP credentials, HTTP connection pools, and web storage. The private session is shared between all private mozbrowsers, and lasts until shutdown.

---
<!-- 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] There are tests for these changes

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11544)
<!-- Reviewable:end -->
2016-06-20 14:32:17 -05:00
Sagar Muchhal
7e2b4d163b Propagate privacy information of iframes to corresponding pipelines. Make iframes of differing privacy values be considered cross-origin.
Make the constellation hand out separate private and public channels for the pipeline content to communicate with the resource thread as necessary.
2016-06-20 14:55:01 -04:00
Zhen Zhang
74eb80dbd8 Implement filter for file-type input's accept attribute 2016-06-20 20:58:53 +08:00
UK992
3ad41897f5 Silent warnings in filemanager_thread.rs 2016-06-18 21:52:00 +02:00
Zhen Zhang
4d3379392d Implement Blob URL's DOM interfaces 2016-06-17 20:06:37 +08:00
Zhen Zhang
256c7e894e filepicker 2016-06-14 20:22:51 +08:00
Manish Goregaokar
9deecd793c
Review fixes 2016-06-11 11:49:40 +05:30
Manish Goregaokar
fd6f9bd411 Test fixes; update for changes in spec 2016-06-10 20:55:25 +05:30
Manish Goregaokar
f4e3e8e38e Re-support gzip 2016-06-10 20:53:47 +05:30
Manish Goregaokar
909b99f1a6 Modify request headers for fetch 2016-06-10 20:53:43 +05:30
Manish Goregaokar
bf99e73cb0 Re-add support for fetching chunks (and thus xhr download progress) 2016-06-10 20:53:40 +05:30
Manish Goregaokar
6e29b872d7 Test fixes:
- Hack to stop hitting unreachable on referer
 - add fetch_done to make sync work
 - Make datauris work by setting the response URI, spec bug
 - Allow for empty bodies
 - Make request bodies work (pass to http, fix fencepost in iter count)
2016-06-10 20:53:36 +05:30
Manish Goregaokar
8bcf54deb5 Use RequestInit instead of LoadData. Make code look like the spec. 2016-06-10 20:53:28 +05:30