Commit graph

51 commits

Author SHA1 Message Date
Ms2ger
277c6d0154 Move ReferrerPolicy to net_traits. 2016-11-04 10:43:37 +01:00
Corey Farwell
3aa2ec653a Don't require PathBuf ownership if we don't need it. 2016-09-16 23:11:04 -04:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Rahul Sharma
1e6293ea1d Integrate service worker manager thread 2016-07-16 23:29:44 +05:30
Corey Farwell
6c02a576cf Rename MIMEClassifier to match Rust acronym naming conventions.
e.g. `std::net::TcpStream`
2016-07-02 17:12:46 -04:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Corey Farwell
55c2f93740 Add NetworkError::LoadCancelled variant. 2016-04-27 00:25:27 -04:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
Corey Farwell
16be0640a8 Refactor loop into a while loop. 2016-04-19 19:36:15 -04:00
Corey Farwell
50c6d937a5 Flatten implementation of net::file_loader::factory. 2016-04-15 09:13:47 -04:00
Simon Martin
3f3e50574a Issue #9095: Send a notification when a file load is cancelled. 2016-01-10 14:06:03 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
David Rajchenbach-Teller
1e81b8c133 Resolves #4183 - Implemementing context-based MIME type sniffing
The version of the standard is not finalized at the time of this writing.
Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
2015-12-31 07:45:03 -05:00
bors-servo
831979d6a7 Auto merge of #8650 - Wafflespeanut:about-404, r=Wafflespeanut
Redirect to an error page on 404!

fixes #7658

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8650)
<!-- Reviewable:end -->
2015-11-26 22:47:03 +05:30
Ravi Shankar
b17ca9bdc1 Redirect to an error page when file's not found 2015-11-26 11:20:42 +05:30
Keith Yeung
af705a6faf Add content_type to metadata in file_loader 2015-11-24 11:52:35 -08:00
Ravi Shankar
10f5584f78 Implement cancellation listener for cancelling network requests 2015-11-12 14:02:59 +05:30
Eli Friedman
aef06f2f20 Consistently use content-type sniffing with all protocols. 2015-10-31 11:26:17 -07:00
Eli Friedman
10664cf3f4 Refactor resource loaders to use send_error utility.
No substantial functional change.
2015-10-13 16:37:12 -07:00
Corey Farwell
81e034885b Cleanup code that was warned by rust-clippy 2015-10-11 20:47:45 -04:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Maciej Skrzypkowski
88815d21ba Add plugins for compositing and net crates #7699
Changed to_string calls to to_owned calls
where was a need.
2015-09-22 13:51:21 +02:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Ms2ger
9185c3de79 Remove as_mut_slice() calls. 2015-04-26 11:09:03 +02:00
Marcus Klaas
c1f25bbfe4 Replace usage of ResponseSenders by LoadConsumer 2015-04-19 13:26:56 +02:00
Josh Matthews
7517aac9e9 Completely abstract sending responses over channels vs. listeners. 2015-04-16 11:46:39 -04:00
Josh Matthews
1644436557 Start switching net/ to use abstractions over channels to allow introducing non-channel communication in the future. 2015-04-16 11:46:39 -04:00
Ms2ger
6881776d81 Avoid virtual calls when loading files. 2015-04-10 11:54:44 +02:00
Josh Matthews
1757afef27 Remove int_uint from net. 2015-04-07 16:13:37 -04:00
Josh Matthews
a3201bc1ac Enable optional mime sniffing, and integrate it with the file loader. 2015-04-06 20:19:30 -04:00
Josh Matthews
2d730f2ae9 Remove the sniffer task. 2015-04-06 19:31:53 -04:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00
Ms2ger
9aa2696641 Stop using old_path in net. 2015-03-26 08:59:33 +01:00
Avi Weinstock
cf0657a403 Fixed some deprecation errors in components/net. 2015-03-23 18:28:44 -04:00
Ms2ger
ba87666cdb Update some code that's feature-gated under core. 2015-03-21 18:44:39 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
808315926c Pass a String to spawn_named.
IntoString has been removed from Rust, and named() will take a String, so
there is no good reason to do otherwise here.
2015-01-21 11:23:19 +01:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Kshitij Parajuli
f5e9ae17cf Shared Sniffer Task
- Added TargetedLoadResponse and ResponseSenders
- LoadData constructor contains the next consumer which means
  SnifferManager doesn't need the next consumer to start
- New SnifferTask is created at new resource_task creation
- Update Unit Tests
2014-11-28 12:35:49 -05:00
Sean McArthur
523445c865 create about_loader, handle about:blank 2014-09-11 08:55:54 -07:00
Sean McArthur
b8b51b6dd8 remove unnecessary proc from resource loader factory 2014-09-11 08:55:54 -07:00
Glenn Watson
627359e9e4 Return error when unable to create a file path from url. 2014-09-11 14:22:59 +10:00
Jack Moffitt
5f713517a2 Fix loading of file URLs with spaces 2014-09-10 18:13:25 -06:00