James Graham
f52276d2cc
Use hosts-replaced URL only when loading resources
2015-08-05 10:34:20 +01:00
Bogdan Cuza
233a769c67
Add spec links
2015-07-28 13:28:41 +02:00
Ms2ger
6329dec31f
Move the WebSocket constructor logic out of WebSocket::new.
2015-07-23 09:00:34 +02:00
Ms2ger
32ddd356b8
Spawn a thread for WebSocket messages.
2015-07-22 20:29:32 +02:00
Ms2ger
91849cb603
Set the WebSocket's Sender from the ConnectionEstablishedTask.
...
This needs to happen off a task because we won't be able to access the
WebSocket object directly once this code moves to a background thread.
There is no behaviour change, because we make sure that self.ready_state is
not Connecting in Send().
2015-07-22 20:28:17 +02:00
Ms2ger
78df6e8d3e
Remove the receiver field from WebSocket.
...
The receiver will be used from another thread than the WebSocket object in
the future.
2015-07-22 20:28:15 +02:00
Ms2ger
56c660d4de
Split up WebSocketTaskHandler.
...
There's no real reason to have internal dynamic dispatch inside a trait
object.
2015-07-22 20:28:13 +02:00
Josh Matthews
d385cb701b
Reject websocket protocol requests that don't match https://tools.ietf.org/html/rfc6455#section-4.1 .
2015-07-22 09:35:07 -04:00
Ms2ger
b467f3e9d6
Don't try to send a message in WebSocket#close if the sender isn't present.
2015-07-16 14:29:04 +02:00
Ms2ger
072fdf695b
Handle Send correctly if readyState is not Open.
2015-07-16 12:43:10 +02:00
Ms2ger
cd741e681d
Remove WebSocket::sendCloseFrame.
...
It is a field that is used a function argument. Given that the control flow
is not quite the same, and we can't add an argument to Send, I opted for a
separate function.
2015-07-16 12:43:08 +02:00
Ms2ger
6a61a5dcf5
Remove parse_web_socket_url in favour of functions in rust-websocket.
2015-07-15 11:26:49 +02:00
Ms2ger
48b94ec02b
Throw an InvalidStateError from WebSocket#send when it is called too early.
2015-07-14 17:27:10 +02:00
Ms2ger
86e94786ae
Stop panicking while establishing a WebSocket connection.
2015-07-14 16:01:59 +02:00
Bogdan Cuza
35d5328271
Fix #6379
2015-07-13 12:03:19 -04:00
Ms2ger
f93f49490f
Replace WebSocketTask::Open by ConnectionEstablished.
2015-07-13 16:03:02 +02:00
Ms2ger
17bd7e5ec3
Remove some dead code from WebSockets.
2015-07-13 16:02:55 +02:00
Ms2ger
4c0c60a4d6
Return the parsed URL from WebSocket#url.
2015-07-13 14:21:18 +02:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Jinwoo Song
7781f331d3
WebSocket constructor should not panic
...
Make an early return when the WebSocket connection fails in the constructor.
Also let the WebSocket connection to be closed when the connection could
not be established.
Fixes #6082 .
2015-06-16 09:45:42 +02:00
Ms2ger
230c4201f3
Revert "WebSocket constructor should not panic"
...
This reverts commit 877c369e0b
.
2015-06-12 09:40:57 +02:00
Jinwoo Song
877c369e0b
WebSocket constructor should not panic
...
Make an early return when the WebSocket connection fails in the constructor.
Also let the WebSockect connection to be closed when the connection could
not be established.
Fixes #6082 .
2015-06-11 13:58:04 +02:00
bors-servo
542519ebfd
Auto merge of #6174 - frewsxcv:cleanup-long-lines, r=SimonSapin
...
Part of https://github.com/servo/servo/issues/6041
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6174 )
<!-- Reviewable:end -->
2015-05-24 18:27:26 -05:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Alexander Putilin
4e440a0ebb
fixes 6111: WebSocket close event shouldn't be Cancelable
2015-05-24 01:38:39 +03:00
Paul Faria
d4be93613b
Adding in a missed algorithm step number in the comments.
2015-05-20 22:17:07 -04:00
bors-servo
d869a3c7a8
Auto merge of #6127 - Nashenas88:websockets-invalid-urls, r=Ms2ger
...
Fix #6061 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6127 )
<!-- Reviewable:end -->
2015-05-20 01:13:57 -05:00
Paul Faria
66e9b33a52
Fixed definition of Close and Send in WebSocket.webidl and updated implementation in websocket.rs.
2015-05-19 23:59:22 -04:00
Paul Faria
51ae7334f5
Responded to more code review comments. Simplified code a lot.
2015-05-19 23:54:38 -04:00
Paul Faria
fe0b77d669
Responded to code review comments, general cleanup
2015-05-19 23:54:36 -04:00
Paul Faria
8e78564dc3
Fixing one missed trailing whitespace, and fixed url
2015-05-19 23:54:34 -04:00
Paul Faria
0362d254b8
Removing trailing whitespace
2015-05-19 23:54:31 -04:00
Paul Faria
31b709a7c2
Initial work on #6061 .
2015-05-19 23:54:29 -04:00
Keith Yeung
ea2bc0023b
Made open event in WebScoket not cancelable ( fixes #6101 )
2015-05-18 00:35:23 +08:00
Ms2ger
d84c3e7a30
Fix some overlong lines.
2015-05-14 13:26:13 +02:00
William Galliher
5afec62f07
Implement incomplete opening, sending, and closing behaviour for WebSockets using rust-websocket.
...
Authors:
Shivaji Vidhale <savidhal@ncsu.edu>
William Galliher <wpgallih@ncsu.edu>
Allen Chen <achen4@ncsu.edu>
Rucha Jogaikar <rsjogaik@ncsu.edu>
2015-05-05 12:17:35 -04:00
Corey Farwell
46f14449d0
Add links to spec for script::dom structs/methods
2015-03-28 20:04:30 -04: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
Matt McCoy
85df7f0d6f
Fixes #4164 Make Constructor and new functions take GlobalRef by value
2015-01-07 18:52:41 -05:00
Manish Goregaokar
7d65673561
Remove extra spaces
...
Command: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/}\\n\\n\\n/}\\n\\n/"`
2014-12-27 02:53:35 +05:30
Manish Goregaokar
552db382d6
Remove manual impls of Reflectors (autogen)
...
Obtained via:
`find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
`find . -maxdepth 1 -type f -print0 |xargs -0 grep -lZ dom_struct | xargs -0 grep -LZ "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`
followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Ms2ger
466faac2a5
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
2014-12-17 15:19:45 -05:00
Michael Booth
2cbf5a3671
Updated reflect_dom_object to be passed by value
2014-11-30 19:47:52 +00:00
Hinali Marfatia
b1d6041420
Implement a basic WebSocket interface.
2014-11-25 15:43:22 +01:00