Commit graph

192 commits

Author SHA1 Message Date
Brian Smith
811bcbefd4 Issue #2402 - Optionally strictly enforce the MIME type of scripts loaded by importScripts(). https://bugzilla.mozilla.org/show_bug.cgi?id=1514680 This is default on in Firefox 67 but Moonchild requested it be set off by default. 2024-01-11 09:46:39 +08:00
roytam1
fa72b197d9 Merge remote-tracking branch 'origin/tracking' into custom 2024-01-05 10:11:42 +08:00
Martok
c451531d54 Issue #2430 - No longer force tcp send buffer size on HTTP/2 uploads > 128KB
With connection-level and stream-level flow control, it is not needed.
On fast connections with large-ish BWP, this can improve upload speed by > 5x
2024-01-05 10:11:19 +08:00
Martok
3e65ae353a Issue #2430 - Allow network.http.spdy.chunk-size to be larger than 16K
According to https://datatracker.ietf.org/doc/html/rfc7540#section-4.2    The size of a frame payload is limited by the maximum size that a
    receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting. This
    setting can have any value between 2^14 (16,384) and 2^24-1
    (16,777,215) octets, inclusive.
2024-01-05 10:10:50 +08:00
roytam1
3039da2cb2 websocket: workaround of mSocketThread use-after-free when application is terminating 2023-12-27 19:18:18 +08:00
roytam1
5a362aa15b Merge remote-tracking branch 'origin/tracking' into custom 2023-12-15 10:29:04 +08:00
Moonchild
f96001ba7c No issue - Allow redirects for requests that require preflight
Spec update, see Bug 1312864
2023-12-15 09:07:32 +08:00
roytam1
ecd3cd8676 Merge remote-tracking branch 'origin/tracking' into custom 2023-10-18 11:48:06 +08:00
Moonchild
50ad087351 Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
2023-10-18 10:17:23 +08:00
roytam1
ca9d8d3960 Merge remote-tracking branch 'origin/tracking' into custom 2023-10-18 10:03:32 +08:00
Moonchild
0315aeee73 Issue #1721 - Follow-up: Properly protect GPC header
Make it a singleton so it cannot be overwritten.
2023-10-18 09:54:42 +08:00
roytam1
ad0a69ae15 Merge remote-tracking branch 'origin/tracking' into custom 2023-09-28 11:51:45 +08:00
Moonchild
fb38f6d74e [network] Refactor TransactionObserver::OnDataAvailable() 2023-09-28 11:51:24 +08:00
roytam1
92d9218cf1 Merge remote-tracking branch 'origin/tracking' into custom 2023-08-31 22:43:48 +08:00
Moonchild
613cd8f4cb [network] Hold a strong ref to mChannel in OpenConn 2023-08-31 22:42:16 +08:00
Moonchild
058e936f62 [network] Add locking around access to WebSocketChannel::mPMCECompressor 2023-08-31 22:41:14 +08:00
roytam1
9f1550fb53 Merge remote-tracking branch 'origin/tracking' into custom 2023-07-06 10:39:29 +08:00
Moonchild
96d1e2766f [network] Prepare for requiring Authorization in CORS ACAH preflight
The Authorization header with a JSON Web Token (JWT) can be sent via
XMLHttpRequest without explicit authorization via Access-Control headers.
According to the spec, this must always explicitly be mentioned in ACAH
request headers and isn't allowed to be wildcarded. However, nobody
currently obeys this rule and many websites are misconfigured because
Chromium and Firefox always allowed it.

This patch adds the more stricter code but keeps it behind an #ifdef 0
to be released later on if and when there is enough consensus on the web
to obey this spec. This patch explicitly avoids the added complexity
Mozilla added to educate web devs since our role in that respect is not
significant. it's not preffed and it won't throw an explicit deprecation
warning.

See Mozilla bugs 1687364 and 1841019.
2023-07-06 10:25:09 +08:00
roytam1
725b27a0f5 Merge remote-tracking branch 'origin/tracking' into custom 2023-05-05 23:02:05 +08:00
Moonchild
a39fd9e75f Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from modules, netwerk, security, storage, testing, toolkit, and
a few scattered misc files. More to come.
2023-05-05 22:59:16 +08:00
roytam1
cad030d6cc Merge remote-tracking branch 'origin/tracking' into custom 2023-01-19 09:43:10 +08:00
Moonchild
525b4e1888 [network] Avoid queue manipulation inside a loop 2023-01-19 09:40:35 +08:00
roytam1
120ac6d556 Merge remote-tracking branch 'origin/tracking' into custom 2022-12-30 09:29:56 +08:00
Moonchild
c95a802078 Issue #2070 - When multiple HSTS headers are received, only consider the first.
This implements a plain interpretations of RFC 6797, which says to only consider
the first HSTS header.
This slightly conflicts with RFC 7230, which says that sending multiple headers
which can't be merged is illegal (except for a specific whitelist which HSTS isn't in),
so this situation should never occur in the first place (and would therefore not need
the explicit entry in RFC 6797).

It improves HSTS robustness dealing with non-compliant servers.

Resolves #2070
2022-12-30 09:21:48 +08:00
roytam1
4ea078d68f Merge remote-tracking branch 'origin/tracking' into custom 2022-12-16 11:25:59 +08:00
Moonchild
6a1e540412 [network] move some generic websocket code to the baseclass 2022-12-16 11:24:17 +08:00
roytam1
de0b4ac202 Merge remote-tracking branch 'origin/tracking' into custom 2022-11-25 11:46:08 +08:00
Moonchild
7fab5ebd11 WebSocketChannel::CleanupConnection should run on the socket thread 2022-11-25 11:42:30 +08:00
Moonchild
37f0199c79 [Network, DOM] Align our implementation with the current CORS/Fetch spec. 2022-11-25 11:41:52 +08:00
roytam1
f9dc0e6d15 Merge remote-tracking branch 'origin/tracking' into custom 2022-11-10 14:55:46 +08:00
Moonchild
0a079c2b90 Issue #2024 - Part 2: Add wildcard to Access-Control-Allow-{Method|Headers}
For requests without credentials, add wildcard to Access-Control-Allow-Headers
and Access-Control-Allow-Method.

Resolves #2024
2022-11-10 14:54:54 +08:00
roytam1
15458344bf Merge remote-tracking branch 'origin/tracking' into custom 2022-10-06 10:30:55 +08:00
Moonchild
1868e88741 Fix some debug assertions.
refactored code porting in assertions causing debug build failures.
2022-10-06 10:26:38 +08:00
roytam1
866ded0b0a Merge remote-tracking branch 'origin/tracking' into custom 2022-09-07 11:03:19 +08:00
Moonchild
5dfded811d Issue #80 - reinstated unified building for some large chunks of our code.
This should reduce compile complexity saving time and reducing linker stress.
2022-09-07 10:36:23 +08:00
roytam1
e235eb81c6 Merge remote-tracking branch 'origin/tracking' into custom 2022-09-01 10:29:38 +08:00
Basilisk-Dev
b4c5ebf00a Issue #1991 - backport Mozilla bug 1266667 2022-09-01 10:18:39 +08:00
roytam1
1822f2031e Merge remote-tracking branch 'origin/tracking' into custom 2022-07-30 08:49:22 +08:00
Job Bautista
faa778ec9d Issue #1975 - Implement Origin header CSRF mitigation.
Backported from Mozilla bug 446344.
2022-07-30 08:43:44 +08:00
roytam1
e89a9eafb1 Merge remote-tracking branch 'origin/tracking' into custom 2022-06-22 09:04:44 +08:00
Brian Smith
95f1786bb4 Issue #1905 - Part 4c - Follow Firefox and Safari in reporting "Intel" for Mac ARM64 devices. Based on Mozilla bug 1655285. 2022-06-22 09:00:31 +08:00
roytam1
e2613c0177 Merge remote-tracking branch 'origin/tracking' into custom 2022-04-28 11:59:07 +08:00
roytam1
9f078ac580 [network] fix build 2022-04-28 11:40:11 +08:00
roytam1
6de07653b9 Merge remote-tracking branch 'origin/tracking' into custom 2022-04-28 10:45:19 +08:00
Moonchild
eaf9e756a0 Issue #21 - Remove remaining telemetry structs, callers and flags. 2022-04-28 10:33:44 +08:00
Moonchild
8d800b1cb0 Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-28 10:25:48 +08:00
roytam1
c277d761f3 Merge remote-tracking branch 'origin/tracking' into custom 2022-03-22 23:32:48 +08:00
Moonchild
e45fbf91ce [Network] Add a socket thread check and early exit for corner cases. 2022-03-22 23:24:09 +08:00
Moonchild
398cb98445 [Network] Only call nsWSAdmissionManager::ConnectNext on the main thread. 2022-03-22 23:21:52 +08:00
roytam1
eedc02ee94 Merge remote-tracking branch 'origin/tracking' into custom 2021-11-10 09:12:40 +08:00