aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/websocket.rs
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #9400 - jmr0:websocket, r=noxbors-servo2016-01-251-7/+4
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * fix websocket header validation, ensure it meets token requirements, addjmr02016-01-241-7/+4
| | | | | | | | testing
* | add origin to location and url apiChandler Abraham2016-01-211-2/+3
|/
* Fix test-tidy errorsJames Sanders2016-01-181-2/+5
|
* Make closing related code more clear and more correctJames Sanders2016-01-181-60/+65
|
* Make WebSocket constructor take (DOMString or sequence<DOMString>)James Sanders2016-01-171-6/+9
|
* Add global default method for Reflectable traitChad Kimes2016-01-111-5/+5
|
* Remove global field from WebSocketChad Kimes2016-01-101-10/+7
|
* task -> threadrohan.prinja2016-01-101-19/+19
|
* Rename fire_simple_event_params to fire_eventBrandon Fairchild2016-01-071-4/+4
| | | | Fixes #9180.
* Changed blob to use DataSlice with Arc in order to limit wasteful copying of ↵David Raifaizen2016-01-061-4/+5
| | | | byte vector
* now panics on integer overflowNikki2015-12-301-2/+1
|
* added a check for buffer overflowNikki2015-12-291-1/+5
|
* updated websocket buffered_amount to be u64 instead of u32Nikki2015-12-291-13/+3
|
* Implement EventTarget::fire_simple_event and ↵Arthur Skobara2015-12-221-9/+5
| | | | EventTarget::fire_simple_event_params
* Auto merge of #8825 - jmr0:master, r=jdmbors-servo2015-12-181-3/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * adding initial support for websocket subprotocol negotationjmr02015-12-171-3/+37
| |
* | Remove from Trusted::new an unnecessary argumentArthur Skobara2015-12-121-2/+2
|/
* Pass around event types as Atoms instead of StringsCorey Farwell2015-12-101-3/+3
| | | | | | `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.
* move websocket creation to resource taskNova Fallen2015-12-081-101/+55
|
* Split fn script_chan into 5 different task channel fnKeith Yeung2015-12-061-3/+3
|
* Auto merge of #8787 - Jayflux:hotfix/8695, r=mbrubeckbors-servo2015-12-031-2/+3
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * now using external ref_slice instead of the std versionJason Williams2015-12-031-2/+3
| |
* | Auto merge of #8693 - yanirs:websocket-close-unspecified-status, r=jdmbors-servo2015-12-031-5/+21
|\ \ | |/ |/| | | | | | | | | | | | | | | 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 -->
| * Implement unspecified websocket close code (fixes issue #8158)Yanir Seroussi2015-11-301-5/+21
| |
* | Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)Manish Goregaokar2015-11-271-13/+17
|/ | | | … and libc 0.2 and many other dependencies
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-5/+5
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Use the conversion traits from js.Ms2ger2015-11-121-19/+19
|
* rename WebSocket::Send_ImplRoman Klauke2015-11-081-3/+3
| | | | | | Previos: `Send_Impl`, now: `send_impl`. Closes: #8345
* Cleanup WebSocket::Send_Impl.Ms2ger2015-11-051-14/+7
|
* Auto merge of #8218 - nikkisquared:master, r=eefriedmanbors-servo2015-11-051-28/+72
|\ | | | | | | | | | | | | | | 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 -->
| * Fixes #8213: Implement Blob variant of WebSocket.send()Nikki2015-11-041-28/+72
| |
* | Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-8/+7
| | | | | | | | | | | | | | | | | | | | 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.
* | Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-1/+1
| |
* | merge from masterrohan.prinja2015-11-031-3/+3
|\ \
| * | Remove JSTraceable implementation from RefCell.Eli Friedman2015-11-021-3/+3
| |/ | | | | | | | | The implementation wasn't really right, and we would rather just use DOMRefCell anyway.
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-2/+1
| |
* | more refactoringrohan.prinja2015-10-301-1/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+2
|/
* Clean up the cast callsAnthony Ramine2015-10-211-8/+4
|
* Introduce trait CastableAnthony Ramine2015-10-211-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Adds bufferedAmount to Websocket (fixes #7856).Jim Berlage2015-10-151-2/+43
|
* Auto merge of #7871 - psdh:sendReason, r=jdmbors-servo2015-10-131-1/+4
|\ | | | | | | | | | | | | | | | | | | Send reason in the Websocket close handshake Fixes #7862 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7871) <!-- Reviewable:end -->
| * Send reason in the Websocket close handshakePrabhjyot Singh Sodhi2015-10-051-1/+4
| |
* | Auto merge of #7885 - jimberlage:7858/null-message, r=Ms2gerbors-servo2015-10-091-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Creates empty string when passed null This should fix #7858. An empty `USVString` is now used when `data` is `None`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7885) <!-- Reviewable:end -->
| * | Require the argument to WebSocket#send() (fixes #7858).Jim Berlage2015-10-081-2/+2
| | |
* | | make blacklist as const arrayvectorijk2015-10-061-65/+65
| | |
* | | Fix #7855 Implement port blockingvectorijk2015-10-061-0/+69
| | | | | | | | | | | | For WebSocket connection algorithm
* | | Refactor Error enum usage to consistently be qualifiedAnthony Urena2015-10-061-4/+3
|/ /
* / remove data field from websocketsRoman Klauke2015-10-051-2/+0
|/ | | | | | | The data field is currently not used (no reads/ writes). This commit removes this field. Ref.-Issue: #7859