Commit Graph

239 Commits

Author SHA1 Message Date
Michal Novotny
eb79b0c461 Bug 1527890 - WebSocketChannel can hang waiting for OnTransportAvailable when HTTP request isn't upgraded, r=valentin
Canceling mOpenTimer is moved to CallStartWebsocketData which is called after calling OnStartRequest as well as OnTransportAvailable.
2019-02-15 00:10:00 +02:00
Coroiu Cristina
70e5f1aeac Backed out changeset 5e586fc7af16 (bug 1527890) for causing leaks on a CLOSED TREE 2019-02-14 22:14:41 +02:00
Michal Novotny
09e758289d Bug 1527890 - WebSocketChannel can hang waiting for OnTransportAvailable when HTTP request isn't upgraded, r=valentin
Canceling mOpenTimer is moved to CallStartWebsocketData which is called after calling OnStartRequest as well as OnTransportAvailable.
2019-02-14 06:22:00 +02:00
Jonathan Kingston
58708e007c Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

Differential Revision: https://phabricator.services.mozilla.com/D16885
2019-02-12 16:08:25 +00:00
Michal Novotny
90bb0d8856 Bug 1527005 - WebSocketChannel hangs waiting for OnTransportAvailable when server responds to upgrade request with HTTP/1.0, r=dragana
We must fail if server responds with HTTP/1.0 because HTTP upgrade requires at least HTTP/1.1 and nsHttpChannel correctly won't perform the upgrade, i.e WebSocketChannel::OnTransportAvailable won't be called.
2019-02-11 10:11:00 +02:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Nicholas Hurley
3f035cff55 Bug 1434137 - Implement websockets over http/2 - RFC 8441 r=michal,dragana
https://tools.ietf.org/html/rfc8441

This uses our existing http/2 CONNECT infrastructure (modified) to
enable the new extended CONNECT form defined by 8441, and pretend for
the websocket's sake that an http/2 stream is actually a socket. From
the websocket's point of view, this is relatively non-invasive - a few
things have changed (http response code, absence of some headers) versus
http/1.1 websockets, but for the most part, the websocket code doesn't
care.

Differential Revision: https://phabricator.services.mozilla.com/D8016
2018-11-06 19:29:57 +00:00
Dragana Damjanovic
fe9c8db4c3 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus 2018-09-22 23:54:11 +03:00
Gurzau Raul
b5bc7bfc3d Backed out changeset dc225279994a (bug 1473736) for web platform leaks 2018-09-21 04:30:10 +03:00
Dragana Damjanovic
49db0c9629 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus
Implement necko part of ESNI

Differential Revision: https://phabricator.services.mozilla.com/D2716
2018-09-20 20:53:28 +00:00
Noemi Erli
094eddb80d Backed out changeset 7aa742bff8fb (bug 1473736) for xpcshell failures and bc failures in browser_urlbarSearchSingleWordNotification.js 2018-09-18 22:07:58 +03:00
Dragana Damjanovic
26aa202e86 Bug 1473736 - Implement necko part of ESNI r=mcmanus
Implement necko part of ESNI

Differential Revision: https://phabricator.services.mozilla.com/D2716
2018-09-17 23:08:14 +00:00
Michal Novotny
fb7690233e Bug 1466577 - Race condition in WebSocketChannel::StopSession. r=hurley
This patch prevents calling WebSocketChannel::StopSession at the same time on main thread from WebSocketChannel::Close and on socket thread from WebSocketChannel::AbortSession.
2018-07-24 17:18:58 -04:00
Michal Novotny
f7d56c7e95 Bug 756165 - Return close code 1015 to JS when TLS setup fails, r=baku, r=valentin
We cannot simply pass the status code using nsIWebSocketListener::OnServerClose because it's called only when the connection is established. Instead, I'm passing TLS failure from http channel to nsIWebSocketListener::OnStop where the correct status code is set.
2018-06-28 07:54:00 +03:00
Andreea Pavel
f1ddf7dbee Backed out changeset 5d8c20358cac (bug 756165) for [@ MOZ_CrashOOL] crashes on a CLOSED TREE 2018-06-28 03:00:49 +03:00
Michal Novotny
d411e9bebc Bug 756165 - Return close code 1015 to JS when TLS setup fails, r=baku, r=valentin
We cannot simply pass the status code using nsIWebSocketListener::OnServerClose because it's called only when the connection is established. Instead, I'm passing TLS failure from http channel to nsIWebSocketListener::OnStop where the correct status code is set.
2018-06-27 06:50:00 +03:00
Andi-Bogdan Postelnicu
cb91211b37 Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal 2018-06-14 11:19:07 +03:00
Boris Zbarsky
a793b360eb Bug 1455676 part 5. Remove nsIDOMNode usage from netwerk/. r=qdot 2018-05-29 22:58:48 -04:00
Andi-Bogdan Postelnicu
99cba2dd23 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ
2018-04-30 19:46:04 +03:00
Sebastian Hengst
d91e9954eb Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
6095241db8 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Michal Novotny
49564a25b3 Bug 1436809 - Check that stream message was converted to string correctly. r=valentin 2018-04-02 12:59:18 -04:00
Valentin Gosu
da41e347f1 Bug 1433958 - Change code that sets nsIURI.scheme to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: GgyIkZSG2y3
2018-02-26 20:43:47 +01:00
Michal Novotny
6ea6df620d Bug 1394564 - Delete current outgoing message when PrimeNewOutgoingMessage fails. r=mcmanus 2017-11-22 05:17:00 -05:00
Geoff Brown
022ef4adff Bug 1407679 - Merge nsIIOService and nsIIOService2; r=nwgh 2017-11-10 07:03:36 -07:00
Andrea Marchesini
c32e6762d0 Bug 1415081 - part 3 - WebSocketChannel cannot use ::Available() to know the size of a nsIAsyncInputStream, r=smaug 2017-11-09 11:18:08 +01:00
Sebastian Hengst
5c152627a6 Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE 2017-10-24 21:18:26 +02:00
Valentin Gosu
eb16c9049c Bug 1407679 - Merge nsIIOService and nsIIOService2 r=nwgh
Removes deprecated nsIIOService2.newChannelFromURIWithProxyFlags

MozReview-Commit-ID: Gr3nA25kcre
2017-10-20 16:41:07 +02:00
Kris Maglione
7a77177f22 Bug 1404198: Part 2c - Switch to NS_NewTimer* in necko. r=njn
MozReview-Commit-ID: 3YyyaBAEjHc
2017-10-15 23:12:02 -07:00
Chris Peterson
90bcd3c611 Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: B5Y8KyExPQ8
2017-09-06 15:00:31 -07:00
Henri Sivonen
4a5ed37f38 Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca
2017-09-01 11:53:31 +03:00
Sebastian Hengst
a030b74d2a Backed out changeset d59b62713c66 (bug 1395527) 2017-09-02 10:38:20 +02:00
Henri Sivonen
3756bf2f04 Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca
2017-09-01 11:53:31 +03:00
Bevis Tseng
59627df038 Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm 2017-07-27 02:18:20 +08:00
Andrea Marchesini
9e8ae1dfd0 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Sylvestre Ledru
9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Kershaw Chang
ba589d5bca Bug 1343741 - Part3: Pass labelled event target to nsIProtocolProxyService::AsyncResolve, r=mayhemer
For dispatching runnable in nsPACMan, this patch sends a labelled event target via nsIProtocolProxyService::AsyncResolve.
2017-07-05 00:48:00 +02:00
Nicholas Nethercote
fcd4f4fa21 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.
2017-06-30 19:05:41 -07:00
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book
238bf154d5 Backed out changeset 4f6302a98ae4 (bug 1372405) 2017-06-21 13:59:26 +02:00
Bill McCloskey
67e8af4720 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng
e6dc9e02bc Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Bill McCloskey
5aec5bf1e9 Bug 1365101 - Convert NS_GetCurrentThread uses in netwerk/ (r=meyhemer)
MozReview-Commit-ID: IHBt6XAG8em
2017-06-12 20:21:43 -07:00
Valentin Gosu
ee6dca6a9e Bug 1368549 - Remove MOZ_WIDGET_GONK from netwerk/* r=mcmanus
MozReview-Commit-ID: J2njLbNwlco
2017-05-29 22:09:04 +02:00
Nathan Froyd
a3cd9ee75a Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus
This change makes the code a little cleaner and reduces the number of
places we call PR_GetCurrentThread, which is important for Quantum DOM
scheduling work.

The conversion was largely automatic, via:

find netwerk/ -name \*.cpp | \
  xargs sed -i -e 's/MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread[^;]*/MOZ_ASSERT(OnSocketThread(), "not on socket thread")/'

and related invocations, with a few manual tweaks at the end.
2017-04-27 14:34:42 -04:00
Jason Duell
040e164669 Bug 711886 - Fail Websocket if server replies with non-matching subprotocol, r=mcmanus 2016-05-11 08:50:13 -07:00
Hideki Takeoka
1ae134f83e Bug 1351948 - Refuse ws messages that don't use minimal encoding. r=michal 2017-04-03 10:49:22 -04:00
Wei-Cheng Pan
9f134bdbf1 Bug 1310127 - Part 3: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus
Add assertions.

MozReview-Commit-ID: DPvgKzVr3ip
2017-01-12 17:48:45 +08:00