Commit Graph
221 Commits
Author SHA1 Message Date
Julian Descottes 50a7f82406 Bug 1892440 - Expose RequestObserversCalled attribute in nsIHttpChannel r=valentin,necko-reviewers
For WebDriver BiDi network interception we need to be able to modify the request as late as possible.
This changeset exposes RequestObserversCalled to JS so that we can update it from the webdriver bidi codebase.

Differential Revision: https://phabricator.services.mozilla.com/D208011
2024-04-19 18:50:18 +00:00
sunil mayya c99b75b76e Bug 1874132 - remove auth headers from preflight request for cross origin requests. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D204608
2024-03-18 08:48:10 +00:00
Kershaw Chang b766c33afe Bug 1816677 - Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D180679
2023-06-28 17:20:41 +00:00
Narcis Beleuzu 457b2e5080 Backed out changeset dfe0fed4de68 (bug 1816677) for xpcshell failure on test_http3_dns_retry.js . CLOSED TREE 2023-06-24 00:42:37 +03:00
Kershaw Chang e0ba50fd2e Bug 1816677 - Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D180679
2023-06-23 15:00:48 +00:00
Kershaw Chang 0eed361483 Bug 1687364 - Authorization header can't be wildcarded for Access-Control-Allow-Headers, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D102932
2023-05-25 15:41:33 +00:00
Sean Feng 610a4aa9a0 Bug 1804086 - Allow document charset to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Depends on D172490

Differential Revision: https://phabricator.services.mozilla.com/D172491
2023-03-22 14:21:40 +00:00
Sean Feng f5713606fe Bug 1804086 - Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Differential Revision: https://phabricator.services.mozilla.com/D172490
2023-03-22 14:21:39 +00:00
Noemi Erli aa2f00d1d7 Backed out 3 changesets (bug 1804086) for causing failures in JSValidatorChild.cpp CLOSED TREE
Backed out changeset 12a40a80a975 (bug 1804086)
Backed out changeset 1bea9ea5e20d (bug 1804086)
Backed out changeset 00feb14e7824 (bug 1804086)
2023-03-22 03:33:43 +02:00
Sean Feng 17c7a776c2 Bug 1804086 - Allow document charset to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Depends on D172490

Differential Revision: https://phabricator.services.mozilla.com/D172491
2023-03-21 22:55:08 +00:00
Sean Feng aad4806b0f Bug 1804086 - Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw
This is needed for doing content decoding for ORB.

Differential Revision: https://phabricator.services.mozilla.com/D172490
2023-03-21 22:55:08 +00:00
Gijs Kruitbosch 431a56be8a Bug 1718082 - track current tab using browserId instead of top browsing context id for network prioritization purposes, r=nika,mconley,necko-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D171646
2023-03-13 17:32:08 +00:00
Dan Robertson 09dd7e4a03 Bug 1771423 - Set Content-Type to an empty string for an blob with no type. r=kershaw,smaug,Gijs
Set the Content-Type to an empty string for an blob when the type was not
given. Ensure that the channel Content-Type is not overriden in the case
that it was previously set and the blob type is not valid.

Differential Revision: https://phabricator.services.mozilla.com/D147481
2022-11-14 15:26:36 +00:00
Dana Keeler 2b664bb490 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
Norisz Fay 3a7109d26f Backed out 2 changesets (bug 1771423) for causing webcompat regressions CLOSED TREE
Backed out changeset c1d1be434427 (bug 1771423)
Backed out changeset 2b7d886f374f (bug 1771423)
2022-09-13 16:26:16 +03:00
Kershaw Chang 867883a547 Bug 1760580 - P1: Make nsIRequest support to store canceled reason, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D156070
2022-09-08 09:11:18 +00:00
Dan Robertson cdd3c2a693 Bug 1771423 - Set Content-Type to an empty string for an empty blob with no type. r=kershaw,smaug,necko-reviewers
Set the Content-Type to an empty string for an blob when the type was not
given. Ensure that the channel Content-Type is not overriden in the case
that it was previously set and the blob type is not valid.

Depends on D147568

Differential Revision: https://phabricator.services.mozilla.com/D147481
2022-08-15 13:52:12 +00:00
smayya 0a8e505e93 Bug 1629690 - Remove deprecated attribute nsIHttpChannel::allowPipelining. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D154076
2022-08-09 10:55:10 +00:00
Nika Layzell 583cee7bac Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
Dimi ad442d4494 Bug 1773043 - Remove flashblock from necko r=kershaw,necko-reviewers
Depends on D149130

Differential Revision: https://phabricator.services.mozilla.com/D149131
2022-06-15 12:55:26 +00:00
Valentin Gosu bec9ce6949 Bug 1735299 - Use fewer NS_ADDREF in netwerk/ r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D128176
2021-10-19 13:44:24 +00:00
Kershaw Chang 6f78a312bf Bug 1725766 - Disallow view-source URI to open external apps, r=necko-reviewers,dragana,valentin
Differential Revision: https://phabricator.services.mozilla.com/D123825
2021-09-09 07:42:59 +00:00
Valentin Gosu 56cd5036af Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila 1f3e4dc865 Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE 2021-06-04 13:53:37 +03:00
Valentin Gosu 5b4ead87fd Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Valentin Gosu 37fe7da279 Bug 1694662 - Remove appcache from viewsource channels r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D106450
2021-04-30 07:20:22 +00:00
Hubert Boma Manilla 0c8f91ed99 Bug 1703786 - Use nsILoadInfo.sandboxFlags instead r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112154
2021-04-15 11:14:23 +00:00
Kershaw Chang 690538fa87 Bug 1698661 - Use the id of top browsing context to dispatch transactions, r=necko-reviewers,kmag,dragana
Differential Revision: https://phabricator.services.mozilla.com/D110219
2021-04-07 07:59:18 +00:00
Nika Layzell 3bcc55008c Bug 1670530 - Part 2: Consistently update supported interfaces in nsViewSourceChannel, r=necko-reviewers,valentin
Previously, the updates in OnStartRequest were not updating some of the
interface fields, including `nsIHttpChannelInternal`, which caused the wrong
channel object to be queried for Cross-Origin-Opener-Policy status during
process switches after a redirect, and crashes.

In the `browser_application_panel_viewsource-service-worker.js` test case, the
http channel was being intercepted by a service worker, but the non-intercepted
channel was being queried. As the non-intercepted channel had not observed
`OnStartRequest`, the query failed.

Differential Revision: https://phabricator.services.mozilla.com/D98619
2020-12-03 17:08:15 +00:00
Nika Layzell 7395fa2c14 Bug 1670530 - Part 1: Don't process multipart content when doing a view-source load, r=mattwoodrow,necko-reviewers,valentin
Before switching to using DocumentChannel to process multipart requests,
multipart documents loaded as a view-source load would be displayed their
plain-text data, as the multipart processing would be after the view-source
channel had wrapped the channel, and replaced the content type with
"application/x-view-source".

This change restores that behaviour, by preventing parent process multipart
processing for wrapped channels like `view-source` loads. This also allowed
removing the replaceRequest option on nsViewSourceChannel, as it was no longer
necessary, and required introducing a mechanism to get the inner http channel
for process switching.

The crash in Bug 1670530 was caused by a bad interaction between the view-source
replaceChannel logic, and the parent/content process switching logic, which
could lead to the load in the content process being initialized in a broken
state after a process switch, due to accidentally acting on a wrapped
view-source channel when an unwrapped one was expected. This patch also fixes
that issue, by removing the replaceRequest logic which caused it in the first
place.

Differential Revision: https://phabricator.services.mozilla.com/D98205
2020-12-03 17:03:45 +00:00
Bogdan Tara c0cc3446be Backed out changeset a1e436deb5fe (bug 1670530) for viewsource related crashed CLOSED TREE 2020-12-03 04:30:23 +02:00
Nika Layzell 3479a534a6 Bug 1670530 - Don't process multipart content when doing a view-source load, r=mattwoodrow,necko-reviewers,valentin
Before switching to using DocumentChannel to process multipart requests,
multipart documents loaded as a view-source load would be displayed their
plain-text data, as the multipart processing would be after the view-source
channel had wrapped the channel, and replaced the content type with
"application/x-view-source".

This change restores that behaviour, by preventing parent process multipart
processing for wrapped channels like `view-source` loads. This also allowed
removing the replaceRequest option on nsViewSourceChannel, as it was no longer
necessary, and required introducing a mechanism to get the inner http channel
for process switching.

The crash in Bug 1670530 was caused by a bad interaction between the view-source
replaceChannel logic, and the parent/content process switching logic, which
could lead to the load in the content process being initialized in a broken
state after a process switch, due to accidentally acting on a wrapped
view-source channel when an unwrapped one was expected. This patch also fixes
that issue, by removing the replaceRequest logic which caused it in the first
place.

Differential Revision: https://phabricator.services.mozilla.com/D98205
2020-12-02 21:57:38 +00:00
Andrew McCreight 929d05c0ac Bug 1678413 - Release listeners for nsViewSourceChannel. r=necko-reviewers,dragana
Release the two kinds of listeners that view source channel has
if AsyncOpen fails, or in OnStop. This matches the behavior of
HttpChannelChild. The former change fixes a leak when view source
channels are blocked by enterprise policies.

It looks like clang-format deleted the double include of
nsViewSourceChannel.h.

Differential Revision: https://phabricator.services.mozilla.com/D98223
2020-11-30 21:09:31 +00:00
Simon Giesecke 46908cfb51 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Dragana Damjanovic d477ce8550 Bug 1675500 - Add more telemetry about http transactions r=necko-reviewers,valentin
This telemetry will be collected for transaction that have used HTTP3 and transaction that have used HTTP2 but the servers they are connecting to support HTTP3.

Differential Revision: https://phabricator.services.mozilla.com/D96459
2020-11-12 02:12:06 +00:00
Hubert Boma Manilla e849096afd Bug 1666723 - Expose and add a test r=dragana,necko-reviewers
Depends on D93137

Differential Revision: https://phabricator.services.mozilla.com/D93922
2020-10-22 23:23:53 +00:00
JulianWels 3878e986b6 Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 12:27:26 +00:00
Mihai Alexandru Michis 88ee1f79ff Backed out changeset b3fb1b5bbe34 (bug 1608074) for causing bustages in XMLHttpRequestMainThread.cpp
CLOSED TREE
2020-10-13 14:55:06 +03:00
JulianWels f6a0f2c0a7 Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 10:39:11 +00:00
Simon Giesecke d2e71d5859 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Junior Hsu 54d8e9beb9 Bug 1638513 - P3 strip request body header for preflight, r=valentin,necko-reviewers
(a) Steal nsCORSListenerProxy::UpdateType since the whole usage is removed
    by bug 1312864. Now I'm using it to indicate if the headers should be
	stripped.
(b) Intentionally to let HttpBaseChannel strip the header to save one
    headers copy. It's set via idl, hence I don't think it's moveable.

Differential Revision: https://phabricator.services.mozilla.com/D78831
2020-06-09 18:38:50 +00:00
Junior Hsu e21a8d455e Bug 1638513 - P2 let nsIHttpChannel implement shouldStripRequestBodyHeader, r=valentin,necko-reviewers
We need to extract the common method into the idl since the connection between necko
and XHR is idl. Need to import the whole necko if we do something like
`#include "HttpBaseChannel.h"

Differential Revision: https://phabricator.services.mozilla.com/D78830
2020-06-09 18:20:15 +00:00
Emilio Cobos Álvarez 03cfd95496 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Shane Caraveo 056b5ff5ce Bug 1530408 add api on channels to prevent using alt-data cache r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68892
2020-04-11 00:18:39 +00:00
Noemi Erli c072e3b083 Backed out 3 changesets (bug 1530408) for causing xpcshell failures in test_ext_webRequest_filterResponseData.js
Backed out changeset 365c4d5fe9b0 (bug 1530408)
Backed out changeset 77bb11a76b33 (bug 1530408)
Backed out changeset 3c76ac7b3965 (bug 1530408)
2020-04-08 12:04:10 +03:00
Shane Caraveo c928b62852 Bug 1530408 add api on channels to prevent using alt-data cache r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68892
2020-03-31 13:41:00 +00:00
Honza Bambas 52a8b03f3d Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025
2020-04-06 15:12:15 +00:00
Mihai Alexandru Michis 64e7ffad08 Backed out changeset 30fe730b5ab1 (bug 1605895) for causing mochitest failures in HttpChannelChild
CLOSED TREE
2020-04-02 20:37:12 +03:00
Honza Bambas 345cd78c92 Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025
2020-04-02 15:53:54 +00:00