Commit graph

228 commits

Author SHA1 Message Date
Anthony Ramine
eb94f1a918 Update SpiderMonkey 2016-05-03 18:36:11 +02:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Di Xu
76f57efb58 replace Fallible<()> with ErrorResult 2016-04-13 19:56:52 +08:00
Rahul Sharma
2caa9a2a76 refactors entities from script_thread into script_runtime 2016-04-06 12:46:49 +05:30
Saurav Sachidanand
4ddf4e7bdc Update WebSocket blocked ports to match the Fetch spec 2016-03-17 18:21:20 +05:30
Sam Gibson
4f736e6f7c Trigger WebSocket error event
Trigger a WebSocket error after receiving an invalid message from the server
2016-02-26 09:43:12 +01:00
bors-servo
63dc161b77 Auto merge of #9683 - kmuszyn:9561-more-thread-source-renamings, r=jdm
Issue #9561 continued - renamed *_thread_source to *_task_source

components/script/dom/bindings/global.rs modified -> all *_thread_source occurrences renamed to *_task_source to comply with spec

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9683)
<!-- Reviewable:end -->
2016-02-18 04:59:32 +05:30
bors-servo
bc034845b7 Auto merge of #9662 - rebstar6:websocket_cookies, r=jdm
Add support for websocket cookies

Addresses both cookies in request and response. Resolves #9540.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9662)
<!-- Reviewable:end -->
2016-02-18 02:44:01 +05:30
Kamil Muszyński
c6dfd7e2fa Issue #9561 continued - renamed *_thread_source to *_task_source in global.rs and related files 2016-02-17 21:25:12 +01:00
Rebecca
cf6fd6dafe Add support for websocket request and response cookies
Also change expected behavior to pass for all in tests/wpt/web-platform-tests/websockets/cookies
2016-02-17 14:50:52 -05:00
Peter
f374e8f420 #9640 Refactor: Move util::str::is_token to script::dom::bindings::str 2016-02-14 22:47:52 +00:00
Ms2ger
5317af1e19 Remove the global argument to EventTarget::{fire_event, fire_simple_event}. 2016-02-08 19:21:56 +01:00
Alexander Lopatin
2be49404be Fix #9508: Beautify our union enums constructors 2016-02-07 02:55:21 +03:00
Manish Goregaokar
ccbd38e2c7 Make websockets not crash in a worker scope 2016-02-04 00:03:18 +05:30
bors-servo
e74021baaa Auto merge of #9400 - jmr0:websocket, r=nox
Fixing websocket subprotocol header validation

This takes care of https://github.com/servo/servo/issues/9034

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9400)
<!-- Reviewable:end -->
2016-01-25 17:01:39 +05:30
jmr0
3846cf52f2 fix websocket header validation, ensure it meets token requirements, add
testing
2016-01-24 18:31:21 -05:00
Chandler Abraham
1ee9ccba21 add origin to location and url api 2016-01-21 11:06:41 -08:00
James Sanders
482d23bb19 Fix test-tidy errors 2016-01-18 17:50:25 -07:00
James Sanders
d121958a17 Make closing related code more clear and more correct 2016-01-18 17:37:16 -07:00
James Sanders
0bffffd8f5 Make WebSocket constructor take (DOMString or sequence<DOMString>) 2016-01-17 21:33:04 -07:00
Chad Kimes
ce6075825d Add global default method for Reflectable trait 2016-01-11 20:23:47 -05:00
Chad Kimes
fbe9107614 Remove global field from WebSocket 2016-01-10 22:24:33 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Brandon Fairchild
fb0304cfdb Rename fire_simple_event_params to fire_event
Fixes #9180.
2016-01-07 13:49:49 -05:00
David Raifaizen
76f689cd06 Changed blob to use DataSlice with Arc in order to limit wasteful copying of byte vector 2016-01-06 19:41:52 -05:00
Nikki
b95af756ad now panics on integer overflow 2015-12-30 10:38:53 -07:00
Nikki
773a15d28a added a check for buffer overflow 2015-12-29 17:08:46 -07:00
Nikki
20edf21352 updated websocket buffered_amount to be u64 instead of u32 2015-12-29 13:30:35 -07:00
Arthur Skobara
d38771e270 Implement EventTarget::fire_simple_event and EventTarget::fire_simple_event_params 2015-12-22 13:47:57 +06:00
bors-servo
63923bc7c9 Auto merge of #8825 - jmr0:master, r=jdm
adding initial support for websocket subprotocol negotation

Addresses #8177

I also noticed some bugs/gaps (and at least one of my TODO's can be an E-Easy)

cc @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8825)
<!-- Reviewable:end -->
2015-12-18 05:23:15 +05:30
jmr0
7d0bede8ba adding initial support for websocket subprotocol negotation 2015-12-17 09:17:15 -05:00
Arthur Skobara
8acb21a594 Remove from Trusted::new an unnecessary argument 2015-12-12 22:31:19 +06:00
Corey Farwell
4accaf50b2 Pass around event types as Atoms instead of Strings
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.
2015-12-10 23:47:25 -05:00
Nova Fallen
e8c8277f34 move websocket creation to resource task 2015-12-08 02:04:40 -05:00
Keith Yeung
8d90034d29 Split fn script_chan into 5 different task channel fn 2015-12-06 12:12:14 -08:00
bors-servo
8ae008761f Auto merge of #8787 - Jayflux:hotfix/8695, r=mbrubeck
now using external ref_slice instead of the std version fixed #8695

Fixes #8695.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8787)
<!-- Reviewable:end -->
2015-12-03 16:10:24 +05:30
Jason Williams
1a8db9a07a now using external ref_slice instead of the std version 2015-12-03 07:32:07 +00:00
bors-servo
01b4deb9d1 Auto merge of #8693 - yanirs:websocket-close-unspecified-status, r=jdm
Implement unspecified websocket close code (fixes issue #8158)

Fixes #8158.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8693)
<!-- Reviewable:end -->
2015-12-03 11:56:18 +05:30
Yanir Seroussi
ad9accf8e7 Implement unspecified websocket close code (fixes issue #8158) 2015-11-30 11:20:41 +11:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Ms2ger
6d2ae85c1f Use the conversion traits from js. 2015-11-12 10:48:58 +01:00
Roman Klauke
4f35941b9d rename WebSocket::Send_Impl
Previos: `Send_Impl`, now: `send_impl`.

Closes: #8345
2015-11-08 14:45:59 +01:00
Ms2ger
0a158967e0 Cleanup WebSocket::Send_Impl. 2015-11-05 12:23:18 +01:00
bors-servo
021f441d24 Auto merge of #8218 - nikkisquared:master, r=eefriedman
I'm working on resolving https://github.com/servo/servo/issues/8213 as per the spec online and feedback in the servo channel. Note that currently I cannot build (and thus test) my code, so this is a bit of a rough first draft. I'd still like feedback on my progress, and I hope that there is another way for my code to be tested.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8218)
<!-- Reviewable:end -->
2015-11-05 10:24:27 +05:30
Nikki
1d280289f1 Fixes #8213: Implement Blob variant of WebSocket.send() 2015-11-04 21:42:10 -07:00
Ms2ger
6b75078503 Make DOMString a newtype around String, rather than a typedef.
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.

Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
David Zbarsky
722aa86c89 Get rid of a bunch of explicit derefs 2015-11-03 19:51:46 -08:00
rohan.prinja
6e774ea6eb merge from master 2015-11-03 19:01:23 +09:00