Commit Graph

154 Commits

Author SHA1 Message Date
Aidan Hobson Sayers
288627acdc servo: Merge #7633 - Remove SslProvider, fixes #7627 (from aidanhs:aphs-remove-sslprovider); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e107f112d87a4cac66e8aa1d5b2daf1e4bcdebc7
2015-09-14 14:57:55 -06:00
João Oliveira
d054140b6d servo: Merge #7549 - Move setting UserAgent header into http_loader::load, (from jxs:master); r=jdm
closes #7541

Source-Repo: https://github.com/servo/servo
Source-Revision: 35c30ab70df6821992769ff7a2b057cfe2f2673c
2015-09-14 08:57:42 -06:00
Mathieu Rheaume
fe567c36c0 servo: Merge #7559 - Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server (from ddrmanxbxfr:RFC-0344-Work); r=nox
Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values.

I hope I didn't rename too much.

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

Source-Repo: https://github.com/servo/servo
Source-Revision: b05f4aa3aa3085e65cb75433ae37bf272216d033
2015-09-12 18:29:56 -06:00
Eli Friedman
4875f833cb servo: Merge #7523 - Fix up some unnecessary uses of unsafe (from eefriedman:unnecessary-unsafe); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: be9a9ffda10fa2c50b13f79dabd49255f29f12f6
2015-09-09 00:05:17 -06:00
Sean McArthur
0316cdde51 servo: Merge #7418 - Enable HTTP connection pooling (from jdm:httppool); r=jdm
Rebased and adjusted version of #6948. Closes #6948.

Source-Repo: https://github.com/servo/servo
Source-Revision: 366d4a83f1448e115cf998cc6c4e8c564773da65
2015-09-02 10:48:07 -06:00
Simon Martin
b1a37d6095 servo: Merge #7449 - Issue #7393: Properly sniff mislabeled feeds (from simartin:issue_7393); r=metajack
Hi,

This patch is an attempt to fix https://github.com/servo/servo/issues/7393, where the code detecting mislabeled feeds (see https://mimesniff.spec.whatwg.org/#sniffing-a-mislabeled-feed) had spurious space in the URLs we need to match.

Note that my testing (in particular rdf_rss_ko_2.xml) highlighted a flaw in "matches", that failed to check that there were more bytes in the string being checked than in the string we're checking against, which completely broke the whole step 5.2.7.

Thanks in advance for your review.

Cheers,
  Simon

Source-Repo: https://github.com/servo/servo
Source-Revision: 9f85370885c84ebb58cd7f4a72a6e78948f468dc
2015-09-01 11:22:52 -06:00
Prabhjyot Singh Sodhi
74ca083aa3 servo: Merge #7489 - removing unnecessary clones (from psdh:clearClone); r=jdm
Fixes #7485

Source-Repo: https://github.com/servo/servo
Source-Revision: 696ccf67943772c6eb496db729e3c22d5176c4a3
2015-09-01 07:02:56 -06:00
Sam Gibson
b05493adbc servo: Merge #7139 - Testable net load (from samfoo:testable-net-load); r=jdm
*The goal of this PR is to get early feedback on this before I go too far down the rabbit hole. This new code path is working, and there's several tests I've written as a proof of concept. There are still some regressions that I'll be fixing in the coming days.*

I've abstracted out the request/response cycle so that it's no longer dependent on the Hyper request/response structs. Since request/response @ hyper are structs, not traits, it made mocking them for tests impossible.

Current issues/concerns:

* This relies on boxing the `HttpResponse` that gets returned from the `HttpRequester` because `HttpResponse` is unsized. I don't know if there's a more idiomatic rust-y way of doing this?
* This relies on boxing the `Read` that is now returned from `load` for the same reason.
* The devtools and resource manager channels are still passed into `load`. It might be easier to inject these as trait dependencies instead of chans as well?
* Needs more tests.

🎩

#6727

Source-Repo: https://github.com/servo/servo
Source-Revision: 7dda183022f9bee8b4bdffe8b4cf31e09b885d94
2015-08-30 20:07:40 -06:00
Josh Matthews
930db63368 servo: Merge #7436 - Improve debuggability of http_loader panics (from jdm:netthreadname); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 645dd7ba03ea56f01f2e162c590ea047516320ac
2015-08-28 13:14:28 -06:00
Johann Tuffe
d9be999626 servo: Merge #7227 - rewrite of mime_classifier.rs to use more iterators (from tafia:tafia-mime_classifier); r=jdm
Rewrite few parts of the file to use more iterators.

Note that I have **no idea** what the code is actually doing functionally, I just tried to mimic exactly what was being done. All tests are ok

Source-Repo: https://github.com/servo/servo
Source-Revision: 9708c63b9c7ae03d65c7add358a98f7213322a3d
2015-08-28 09:35:47 -06:00
Sara Tang
41aeeb280f servo: Merge #7352 - BinaryOrPlaintextClassifier::classify_impl does not need to return Option (from saratang:issue_7347); r=Ms2ger
Fixes for Issue #7347, though I wasn't sure how to test my code afterwards.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78d72f6a9bfa6c2f4828a6e8c83265526b666f1a
2015-08-26 05:53:38 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
João Oliveira
3436fe7092 servo: Merge #7257 - Replace uses of for foo in bar.iter(), (from jxs:master); r=Ms2ger
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d6d6a05009606dfbbfc9765d7dc2c745c18f6a5
2015-08-18 02:46:46 -06:00
Glenn Watson
d58f2c501d servo: Merge #7246 - Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA) (from glennw:platform-ua); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: f340900c38768122ee8647eb3dc3f7cd0e2a6254
2015-08-17 22:44:38 -06:00
Josh Matthews
6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -06:00
João Oliveira
8410286b02 servo: Merge #7225 - Replace uses of for foo in bar.iter() and for foo in bar.iter_mut() (from jxs:master); r=nox
closes #7197

Source-Repo: https://github.com/servo/servo
Source-Revision: a1b3f477aa541fda4d1b6ccb02c3e56143f4d217
2015-08-15 03:03:21 -06:00
João Oliveira
f0a3f70810 servo: Merge #7208 - replace .len() == 0 with is_empty() (from jxs:master); r=Ms2ger
closes #7198

Source-Repo: https://github.com/servo/servo
Source-Revision: 85022a4c347dca3f5d28cec3010f7e9410217df4
2015-08-14 00:51:59 -06:00
wilmoz
f8de174f17 servo: Merge #7140 - Remove Message suffix from NetworkEventMessage (from wilcus:master); r=jdm
https://github.com/servo/servo/issues/7129

Source-Repo: https://github.com/servo/servo
Source-Revision: 15a73614f4ae9f7b00a44aa66d899ab4a5254114
2015-08-11 01:34:47 -06:00
Adrián Arroyo Calle
b5a5e11c26 servo: Merge #7125 - MIME classifier should use &[T] instead of &Vec<T> (from AdrianArroyoCalle:master); r=Ms2ger
Closes #7109

Source-Repo: https://github.com/servo/servo
Source-Revision: a91c366c06be4bf1765dc8be1c019146d5da3b48
2015-08-10 07:04:26 -06:00
Connor Imes
98496efd1b servo: Merge #7053 - Move net_error_list from net to net_traits. Fixes #7050 (from connorimes:move-net-error-list); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 44c4bb00c1cb8645ee2fc303848a5136108e594f

--HG--
rename : servo/components/net/net_error_list.rs => servo/components/net_traits/net_error_list.rs
2015-08-07 01:55:20 -06:00
James Graham
a77654c4c2 servo: Merge #6416 - Use hosts-replaced URL only when loading resources (from jgraham:hosts_replaced); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8602d01af2b2081ea1e9d600abdb1ea609a65038
2015-08-05 08:01:03 -06:00
Sam Gibson
34d2f0c3a8 servo: Merge #6722 - Obey Strict-Transport-Security header (from samfoo:sts-headers); r=jdm
Resolves #6703.

Done:

* [x] When STS headers received, add the host to the HSTS list

Todo:

* [ ] Persist the in-memory list so that it's reloaded on the next browser boot
* [ ] Add tests to `http_loader::load` - it's pretty well completely untested right now, but it's a bit gnarly to untangle and without mocking, it's hard to deal with the dependency on making a real network request. Writing a mock request object should be doable for testing, but there's a lot going on in the function right now.

Source-Repo: https://github.com/servo/servo
Source-Revision: f1c26c59f177570a697c420308fb89d9773c7468
2015-08-02 11:14:02 -06:00
Patrick Walton
3b92de7a22 servo: Merge #6586 - script: Make the resource task communication use IPC channels (from pcwalton:resource-task-ipc); r=jdm
This change makes Servo use serialized messages over IPC channels for resource loading. The goal is to make it easier to make Servo multiprocess in the future. This patch does not make Servo multiprocess now; there are many other channels that need to be changed to IPC before that can happen. It does introduce a dependency on https://github.com/serde-rs/serde and https://github.com/pcwalton/ipc-channel for the first time.

At the moment, `ipc-channel` uses JSON for serialization. This is because serde does not yet have official support for bincode. When serde gains support for bincode, I'll switch to that. For now, however, the JSON encoding and decoding will constitute a significant performance regression in resource loading.

To avoid having to send boxed `AsyncResponseTarget` trait objects across process boundaries, this series of commits changes `AsyncResponseTarget` to wrap a sender only. It is then the client's responsibility to spawn a thread to proxy calls from that sender to the consumer of the resource data. This only had to be done in a few places. In the future, we may want to collapse those threads into one per process to reduce overhead. (It is impossible to continue to use `AsyncResponseTarget` as a boxed trait object across processes, regardless of how much work is done on `ipc-channel`. Vtables are fundamentally incompatible with IPC across mutually untrusting processes.)

In general, I was pretty pleased with how this turned out. The main changes are adding serialization functionality to various objects that `serde` does not know how to serialize natively—the most complicated being Hyper objects—and reworking `AsyncResponseTarget`. The overall structure of the code is unchanged, and other than `AsyncResponseTarget` no functionality was lost in moving to serialization and IPC.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 2eb122f394651232abd683fc576a5c4288bf277f
2015-07-31 16:06:36 -06:00
Patrick Walton
8325a09ce0 servo: Merge #6745 - devtools: Convert the developer tools to run over IPC (from pcwalton:devtools-ipc); r=jdm
This was a large, invasive change.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bc1db3fe85f2a1a04536f0f6045b53b1319f4bc
2015-07-27 11:09:38 -06:00
Patrick Walton
6d44729f83 servo: Merge #6597 - script: Make the ImageCacheTask use IPC (from pcwalton:image-cache-ipc); r=jdm
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: e13ebf712de444132a6cc90f394c121d8d751c4c
2015-07-27 00:08:15 -06:00
Patrick Walton
a97d607394 servo: Merge #6746 - net: Convert the storage task to use IPC (from pcwalton:storage-task-ipc); r=jdm
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 362de0390280d01989521b2176477510fb6c0413
2015-07-26 18:07:32 -06:00
Sam Gibson
69f6c7e1ca servo: Merge #6490 - Implement HSTS (preload-only) (from samfoo:hsts-preload); r=jdm
Implement HSTS (preload-only) servo/servo#6105

* Downloads the HSTS preload list from the chromium repo (same as gecko), then convert it to a list appropriate for servo.
* Reads the preload list when creating a resource task, and implements STS for those domains.

Still todo:

* Read Strict-Transport-Security headers from servers and add details to the in-memory HSTS list. (note: this requires hyper or servo to implement an STS header struct. Hyper seems like the appropriate location, so I will create an issue/PR there soon). The work for this is nearly done with the exception of adding a new ControlMsg and the new header.
* Persist HSTS list to disk with known hosts (perhaps a different issue should be raised for this?)

Source-Repo: https://github.com/servo/servo
Source-Revision: ab3d6c472d409c1602c873dcdcb495a7fec9d4b0
2015-07-22 10:23:05 -06:00
Bogdan Cuza
5e266ea18c servo: Merge #6648 - Make tidy check for "*" in toml files (from boghison:tidytoml); r=jdm
This checks every .toml file for an asterisk and prints an error if found.

Source-Repo: https://github.com/servo/servo
Source-Revision: 58e9bc6583b6ebbeb27e3b28a6b271ee48cd695a
2015-07-20 14:43:05 -06:00
Patrick Walton
45366270f1 servo: Merge #6593 - compositing: Make the constellation messages serializable (from pcwalton:constellation-ipc); r=jdm
Same idea as before. This depends on:

* https://github.com/servo/euclid/pull/94
* https://github.com/hyperium/hyper/pull/603

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f4bdc6ad631dc56b64622e3390943b59270b3ae
2015-07-18 07:43:24 -06:00
Martin Robinson
f7a684b3a0 servo: Merge #6591 - Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) (from servo:rustup_2015-07-10); r=larsbergstrom
Depends on https://github.com/jgraham/webdriver-rust/pull/12.

Fixes #6020.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9af229b83095f2f8cfe7b61003b85ddf781f4ea7
2015-07-14 13:40:22 -06:00
Ms2ger
99cf771646 servo: Merge #6464 - Use Box::into_raw rather than boxed::into_raw (from Ms2ger:into_raw); r=saneyuki
The latter is deprecated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eb3cc2a241dff4df57d644fa5257fcf3a52325f
2015-06-26 04:50:54 -06:00
Ms2ger
18fd8097a2 servo: Merge #6459 - Update to rustc 2d0cbf3e3e25e092bd9e4c94d08e446b680869f0 (from servo:rustup_20150625); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 21b48fc44d0b32627918b4778fed16203eecdba5
2015-06-25 12:03:15 -06:00
Pyfisch
9bacf73484 servo: Merge #6450 - Remove is_some() from mime_classifier.rs (from pyfisch:patch-1); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: b1021c36c53914a42bbc5c6e5ec7795dbf29f9d3
2015-06-23 15:14:30 -06:00
ecoal95
b32a9cd993 servo: Merge #6423 - Use euclid from crates.io (from emilio:euclid); r=glennw
Sorry for not doing it yesterday, I couldn't.

cc @metajack @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
2015-06-18 20:50:22 -06:00
Ms2ger
3ba4358a8a servo: Merge #6325 - Use str::parse() rather than FromStr::from_str (from Ms2ger:from_str); r=nox
The former appears to be preferred.

Source-Repo: https://github.com/servo/servo
Source-Revision: db2eb36e19581eee83247160bbb03e2a671d0479
2015-06-14 03:55:56 -06:00
Eduard Burtescu
3c5a945f75 servo: Merge #6302 - Preserve UserAgent header on redirect (from eddyb:preserve-ua-on-redirect); r=nox
This unblocks facebook.com's feed, after a few months of it being accidentally broken.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8063e342359615552b26ea10d42b2c6a827331fb
2015-06-12 19:51:26 -06:00
Manish Goregaokar
3a4ae3831a servo: Merge #6314 - Audit and reduce usage of unstable features (from Manishearth:feature_audit); r=mbrubeck
Will post audit report in a bit

Source-Repo: https://github.com/servo/servo
Source-Revision: 88c1cdc9fca6568d1075ea9577ac996c5f73b98f
2015-06-09 14:31:42 -06:00
Eduard Burtescu
1ef27572ef servo: Merge #6301 - Use the correct log crate and setup env_logger in main (from eddyb:fix-logging-2); r=larsbergstrom
Fixes #6103.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1587d8a301983b881b038c7e443ba6d1deb1f72f
2015-06-06 15:49:56 -05:00
Corey Farwell
ff75ac488c servo: Merge #6286 - Bump rust-url version: 0.2.16 → 0.2.35 (from frewsxcv:bump-url); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ad5846f2e14ac15aca9f561975ae9476d0f13244
2015-06-04 16:34:40 -05:00
Manish Goregaokar
def53ee6c3 servo: Merge #6254 - Move to latest hyper everywhere, more package updates (from servo:rustup_20150601); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 20f63459ef198bf96679cbb72355917e7a774265
2015-06-02 12:53:37 -05:00
Corey Farwell
2196fc505a servo: Merge #6230 - Remove get_ prefix on getters (from frewsxcv:getters-get); r=nox
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`

Source-Repo: https://github.com/servo/servo
Source-Revision: f6fe1953343a417b62fb310a380af7c6973849b0
2015-06-02 08:17:03 -05:00
Mike Blumenkrantz
2dc4375f93 servo: Merge #6175 - Embedding: revenge of cargo (from zmike:embedding-REVENGE_OF_CARGO); r=larsbergstrom
Adds a bunch more embedding interfaces/callbacks/functionality

@larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ebfe81e454ca6dd68210b4475b4091e836dd1a
2015-05-27 14:17:32 -05:00
Alexander Putilin
20769db92d servo: Merge #6171 - fixes 4184: no-sniff and check-for-apache-bug for mime sniffing (from eleweek:fix-4184-ok); r=Manishearth
I tried fixing #4184 , here is the code I have right now.

I haven't tested it, because I don't know what is the best way to test this part of code. Would like some help with testing this. Should I write an autotest or should I just test manually?

Source-Repo: https://github.com/servo/servo
Source-Revision: be6c251e4c01be61400786e25442f6df36f135f6
2015-05-25 23:10:18 -05:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Patrick Walton
f8784adc92 servo: Merge #5586 - net: Don't load the placeholder image for background images, only for image fragments (from pcwalton:no-broken-background-image-redux); r=glennw
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 77099b25d590fdaac76721e7f98f4e83672e64a6
2015-05-20 16:43:31 -05:00
Keith Yeung
3156188545 servo: Merge #6129 - Implement fetch (partial #4576) (from KiChjang:fetch-spec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 79ed6250f0535d62a12b1d7e47e48926d6e3925a
2015-05-19 23:08:41 -05:00
Ms2ger
e29f24a0f3 servo: Merge #6134 - Cleanup the fetch code (from Ms2ger:fetch); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 40dded8b3a2e9eb9c0f0b7af189df27f3ad6414a
2015-05-19 12:13:37 -05:00
Keith Yeung
30bcca955a servo: Merge #5824 - Implemented http fetch (partial #4576) (from KiChjang:http-fetch-spec); r=jdm
This is a work-in-progress for the implementation of HTTP fetch. Currently, it does not compile, as I haven't figured out how to solve the issues regarding borrows and lifetimes.

Source-Repo: https://github.com/servo/servo
Source-Revision: 90aacf00f866c7ef3b858d84585bd5142f74c9ee
2015-05-18 09:23:43 -05:00
Simon Sapin
e50563524e servo: Merge #6021 - Upgrade to Hyper 0.4.0 (from SimonSapin:hyperup); r=Manishearth
r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 8cacf20a075b3747509897599c37662721d18d1c
2015-05-12 12:42:49 -05:00
Mike Blumenkrantz
be4c48b847 servo: Merge #5985 - Embedding: wooden bikeshed (from zmike:embedding-woodenbikeshed); r=larsbergstrom
Some small changes.

@larsbergstrom or whoever cares the most at this exact moment.

Source-Repo: https://github.com/servo/servo
Source-Revision: 892a7404266983c6d51218bc18b8aa878d9a7a3e
2015-05-08 15:03:52 -05:00