Commit graph

314 commits

Author SHA1 Message Date
Shadow
8f2f4d8d3d Issue #2703 - Part 4: Fix incorrect clang warning in nsCORSListenerProxy.
See BZ Bug 1444472
Resolves #2703
2025-03-23 12:27:29 +08:00
Shadow
fdfe81fe54 Issue #2703 - Part 3: Make cache entry request checking more readable. 2025-03-23 12:27:16 +08:00
Shadow
7854198085 Issue #2703 - Part 2: Don't repeatedly construct comparators when checking cache entries.
nsCaseInsensitiveCStringComparator ought to be cheap to construct, but
the object actually has a vtable to install and whatnot.  So it's
beneficial to pull the construction of it outside of the headers loop.
2025-03-23 12:27:01 +08:00
Shadow
d678f508de Issue #2703 - Part 1: micro-optimize purging expired preflight cache entries.
The entries in mMethods and mHeaders aren't sorted in any special way,
so we can remove expired entries using UnorderedRemoveElementAt, which
is faster than RemoveElementAt.
2025-03-23 12:26:44 +08:00
Shadow
d9c27beb51 No Issue - Stop warning if a network request failed.
Bug 1286036
2025-03-13 23:04:39 +08:00
Moonchild
064d8757f5 Update eTLD list (PSL) 2025-01-29 12:24:22 +08:00
Moonchild
624ff30bfc [network] Don't try to use non-existing connections. 2025-01-18 10:31:13 +08:00
Moonchild
024ab86be6 [network] Verify connection NPN against negotiated NPN. 2025-01-10 22:30:15 +08:00
Moonchild
d63a56adac Issue #2673 - Part 4: Hook up the ADTS sniffer + raw AAC MIME type. 2025-01-10 22:29:32 +08:00
Moonchild
e448ec4c0d [no issue] Remove duplicate FLAC MIME type define. 2025-01-10 22:27:44 +08:00
Moonchild
2e1c487563 Issue #2670 - Compute baseDomain when cookies are read from the database
baseDomain is used as a key for cookies in a hashmap. For cookie
operations to work properly, the baseDomain generation must be reliable.
This is, however, not the case, because the result can change by updates
to the public suffix list (PSL).

Since the stored baseDomain is not reliable, the value must be recomputed
when the database is read. This causes a minor performance hit but is
needed if we want to keep abreast of PSL changes without clobbering the
cookies database.

Resolves #2670
2024-12-28 21:53:30 +08:00
Moonchild
d935c4f54c Issue #2672 - Follow-up: Remove unused telemetry variable. 2024-12-28 21:52:54 +08:00
Moonchild
d69e2a3779 Issue #2672 - Part 4: Prevent db access while rebuilding is underway. 2024-12-28 21:52:29 +08:00
Moonchild
032b0ae0d8 Issue #2672 - Part 3: Ensure thread lifetimes are in tandem. 2024-12-28 21:52:05 +08:00
Moonchild
fe53a0bb1c Issue #2672 - Part 2: Auto-close syncConn for edge cases. 2024-12-28 21:51:39 +08:00
Moonchild
aec27853c6 Issue #2672 - Part 1: Load nsCookieService OMT and use sync reads.
No more lazy-loading on the main thread, thanks. Everyone needs this.
2024-12-28 21:51:14 +08:00
Martok
334de9ffcc Issue #1787 - Follow-up: remove no longer used AppClearDataObserver. 2024-12-20 13:43:05 +08:00
Moonchild
01624751a1 [network] Update effective TLD names list. 2024-11-29 20:50:54 +08:00
Moonchild
ff89fee91d Issue #1787 - Remove nsIAppsService, mozIApplication and mozapp data cleanup. 2024-11-21 21:09:05 +08:00
Moonchild
ef5f052d97 Issue #2657 - Remove -moz-samplesize resize-decoding for low-vram mobiles
Resolves #2657
2024-11-21 21:08:24 +08:00
Moonchild
0e6fa95840 Issue #2653 - Part 2: Update tests 2024-11-21 21:01:54 +08:00
Moonchild
7b6e3a2d4a Issue #2653 - Part 1: Initial cleanup of AppId and isolated mozbrowser.
This removes a lot of the plumbing for having the platform embed itself
through IPC which was required for B2G running the browser as both
shell and browser application.
2024-11-21 21:01:27 +08:00
Moonchild
f5ef327563 Issue #2652 - Part 1: Add a way to programmatically clear the DNS cache. 2024-11-21 20:57:16 +08:00
Moonchild
5c0c0c02d9 Issue #2648 - Inherit the content disposition of the multipart response 2024-10-31 21:47:41 +08:00
Moonchild
6fe326c7bb Issue #2648 - Apply CSP to documents sent through multipart/x-mixed-replace 2024-10-31 21:47:28 +08:00
Moonchild
7d978ccd71 Issue #2641 - Update Fetch to adhere to the updated spec (pass refpolicy)
Resolves #2641
2024-10-24 07:37:31 +08:00
FranklinDM
2d60c54926 Issue #2578 - Part 2: Implement preference for disabling CORS preflight requests if CORS is disabled 2024-09-13 10:03:53 +08:00
Moonchild
dd4e060135 Issue #2554 - Follow-up: Also block [::] and [::0.0.0.0] IPv6 addresses. 2024-08-15 09:39:33 +08:00
Moonchild
fad481b612 Issue #2554 - Follow-up: Correct code comment (no functional changes) 2024-08-15 09:39:06 +08:00
Moonchild
d44b309966 Issue #2554 - Block access to 0.0.0.0 on non-Windows OSes.
Resolves #2554.
2024-08-15 09:38:35 +08:00
Moonchild
9759098329 [network] Add additional cookie setting checks.
Added checks for sub-document navigations from cross-site to same-site in
third-party checks when setting a cookie.
2024-07-10 14:54:46 +08:00
Moonchild
d9ff917f15 Issue #2542 - Part 9: Remove TODO comment.
From our understanding of the spec, our current implementation is
feature-complete.
2024-07-10 14:49:39 +08:00
Moonchild
fffe6c4996 Issue #2542 - Part 7: Move SecFetch.* to /netwerk where it belongs. 2024-07-10 14:49:06 +08:00
Moonchild
8076de8965 Issue #2542 - Part 2: Base implementation of Sec-Fetch-* header code.
Currently following Mozilla putting stuff in /dom for additional porting,
but it's actually the wrong location since it belongs in /netwerk with
the other code that deals with http headers.
2024-07-10 14:45:39 +08:00
Moonchild
bcdf7dc845 [network] Avoid accessing raw pointers in nsTransportEventSinkProxy. 2024-06-12 15:12:37 +08:00
Moonchild
bfb171c783 [network] Perform a case-insensitive match on special cookie prefixes. 2024-06-12 15:11:50 +08:00
Moonchild
f3413e94b9 [network] Make http digest auth cnonce length configurable. 2024-05-22 15:20:46 +08:00
Moonchild
1ddd3ea76b [network] Keep track of and check HTTP/2 header sizes. 2024-04-19 09:34:14 +08:00
FranklinDM
656ee639c5 Issue #2112 - Part 1: Remove Stylo tests 2024-04-02 22:29:48 +08:00
Moonchild
9d320dac80 [network] Block set-cookie from multipart/x-mixed-replace 2024-02-23 10:53:04 +08:00
Moonchild
79b4c36ef8 Issue #2451 - Send referrer headers with CORS preflight requests.
This is dependent on referrer policy.

Fixes #2451
2024-01-18 10:04:42 +08:00
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
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
Kershaw Chang
600142110d Bug 1736385 - Make sure thread is alive in CacheIOThread::ThreadFunc 2023-12-21 10:18:53 +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
Moonchild
d55111c4fd [Network] Fix relative URL path starting with multiple slashes 2023-11-24 17:05:20 +08:00
Moonchild
38f8fde3e3 [network] Block more invalid cookie name characters.
This blocks the following characters from use in the cookie name:
0x3B (semi-colon), 0x3D (equals) and 0x7F (del)
2023-10-26 10:51:50 +08:00
Moonchild
50ad087351 Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
2023-10-18 10:17:23 +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