Commit graph

106 commits

Author SHA1 Message Date
Moonchild
525b4e1888 [network] Avoid queue manipulation inside a loop 2023-01-19 09:40:35 +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
Moonchild
6a1e540412 [network] move some generic websocket code to the baseclass 2022-12-16 11:24:17 +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
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
Moonchild
1868e88741 Fix some debug assertions.
refactored code porting in assertions causing debug build failures.
2022-10-06 10:26:38 +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
Basilisk-Dev
b4c5ebf00a Issue #1991 - backport Mozilla bug 1266667 2022-09-01 10:18:39 +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
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
9f078ac580 [network] fix build 2022-04-28 11:40:11 +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
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
8fb608b22d remove OSX support 2021-11-10 09:10:25 +08:00
Moonchild
3612f45a90 [network] Stop treating http and https as different for encoding schemes.
There is no reason to treat available encoding schemes for these protocols
differently.
2021-07-15 09:23:13 +08:00
Moonchild
434b3269fb Issue #1767 - Prevent incorrect calling of network change detection function.
This rewrites the websocket channel network change detection function to not
skip part of its logic in a situation that has already been checked, preventing
a thread race. See analysis of the problem in the issue.
2021-05-05 10:25:45 +08:00
Moonchild
b83d024efb [network] Hold mutex when accessing mSecurityInfo. 2021-01-27 21:03:07 +08:00
Brian Smith
e4030ad075 Issue #1690 - Part 1: Fix MacOS version detection above 10.15.
Changes based on Mozilla bug 1616404 but supporting back to 10.7.
2020-12-02 09:57:28 +08:00
Moonchild
63a7c7f90e [http] Use a copy of nsHttpConnectionInfo.
The root cause in this bug is that the connection info used by
'SpdyConnectTransaction' is the same instance as the connection info in
'nsHttpTransaction', so we should clone it and let 'SpdyConnectTransaction' use
the cloned one.
2020-11-20 09:31:27 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild
d7a4abc3d4 Issue #1656 - Part 4: Tackle *.idl, *.css, *.ipdlh, *.webidl, *.cc 2020-09-25 22:04:18 +08:00
Moonchild
30df895eb2 Issue #1656 - Part 3: Nuke more vim config lines in the tree.
Another S&R run with some smarter matching.
2020-09-25 22:04:17 +08:00
Moonchild
8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
Moonchild
52c03190ee [network/dom] Improve sanitization of download filenames. 2020-07-31 08:07:47 +08:00
Moonchild
be78f46bae Issue #80 - De-unify netwerk/protocol/http 2020-05-23 06:52:58 +08:00
Moonchild
ff440ebb84 Issue #80 - De-unify netwerk/protocol/res 2020-05-23 06:52:55 +08:00
Moonchild
f0b717678c Issue #80 - De-unify netwerk/protocol/ftp 2020-05-23 06:52:03 +08:00
Moonchild
911270ea60 Issue #80 - De-unify smaller netwerk/protocol components
- data
- device
- file
- viewsource
- wyciwyg
2020-05-23 06:52:01 +08:00
Moonchild
60b7d2e259 Issue #80 - De-unify netwerk/protocol/about 2020-05-23 06:51:57 +08:00
wolfbeast
4337a5f1a8 Issue #1505 - Part 3: Make native mode actually native again. 2020-04-11 09:40:32 +08:00
wolfbeast
11f8f80826 Issue #1505 - Part 2: Store application build ID in nsHttpHandler
Since we're needing to reuse this several times, it makes it simpler to
just get it once in init and storing it.
2020-04-11 09:40:31 +08:00
wolfbeast
41a3028a67 Issue #1505 - Rebuild application version string
To respond dynamically to the pref change, the mAppVersion string needs
to be rebuilt.
Includes some minor improvements for corner cases and removes leftover
b2g junk.
2020-04-11 09:40:30 +08:00
wolfbeast
052b2e70a3 Issue #1280 - Un-bust certerror pages and ForgetAboutSite 2020-04-03 09:30:07 +08:00
JustOff
6aa52af7ac Issue #1473 - Fix building %OS_SLICE% on non-Windows platforms 2020-04-03 09:26:52 +08:00
JustOff
4f0a0c4606 Issue #1482 - Give dynamic SSUAO rules priority over static ones 2020-03-20 08:58:11 +08:00
JustOff
efb161c255 Issue #1053 - Remove no longer used function and modules from UserAgentUpdates.jsm 2020-03-13 10:24:01 +08:00
JustOff
0333159186 Issue #1473 - Add %OS_SLICE% macro to SSUAO to refine OS info 2020-03-13 10:23:59 +08:00
Matt A. Tobin
bb8b180863 Issue #1053 - Remove android support from netwerk/protocol/http/nsHttpHandler.cpp 2020-02-27 07:31:16 +08:00
Matt A. Tobin
93a435ae22 Issue #1053 - Remove android support from netwerk 2020-02-27 07:31:14 +08:00
wolfbeast
47cc63bc6c [Network] Bump http channel default Firefox CompatMode init value. 2020-02-14 22:46:00 +08:00
New Tobin Paradigm
57809c759f Fix preprocessor directive in UserAgentUpdates.jsm 2020-02-07 07:56:01 +08:00
Matt A. Tobin
ef27cc7fd0 Issue #65 - Remove AppConstants from netwerk/ 2020-02-07 07:52:32 +08:00
athenian200
0fbfd09291 Fix whitespace. 2020-01-31 07:34:08 +08:00
athenian200
bd714bc690 Issue #1349 - Stop 2xx FTP responses from causing browser to hang.
LIST and RETR still appear to work as intended on ftp:// URLs after my changes. I wasn't able to test STOR because the browser doesn't appear to support FTP uploads at this time (although our FTP implementation appears perfectly capable of doing an FTP upload.)

If I understood the issue correctly, though, what we're doing is ensuring that we receive a preliminary 100 response from the FTP server for a given action before jumping to the 200 code describing what we do if the action was completed. Even though it makes no logical sense for a server to say an action was completed before it was initiated, someone could write a really annoying FTP server that takes advantage of this fact to crash the browser if they wanted.
2020-01-31 07:34:06 +08:00
wolfbeast
c8f73fb28e No issue - Fix unsafe http methods on HTTP/2 with TLSv1.3 0RTT. 2020-01-24 09:10:40 +08:00
wolfbeast
d43f7275d0 Handle missing base64 challenge in NegotiateAuth and NTLMAuth. 2020-01-10 17:07:02 +08:00
Gaming4JC
eb555aaa47 Issue #1288 - Use NS_DECL_THREADSAFE_ISUPPORTS in HttpBaseChannel.cpp
Fixes a regression in Part 1b which caused HTML5 parser to fall off the main thread.
2019-11-22 10:45:19 +08:00