Commit Graph

90 Commits

Author SHA1 Message Date
Dragana Damjanovic
4cc75ae7c3 Bug 1425156 - Fix bug in the http-auth dialog blocking. r=ckerschb 2017-12-14 20:22:56 +01:00
Dragana Damjanovic
2a8c288101 Bug 1409449 - Do not show auth-dialog for triggeringPrincipal==SystemPrincipal. r=ckerschb r=valentin r=francois 2017-12-12 10:34:12 +01:00
Dragana Damjanovic
9d24773cba Bug 1423522 - We should not block http-authentication prompts for proxies. r=ckerschb 2017-12-06 14:13:32 +01:00
Liang-Heng Chen
1ebcb9d643 Bug 1410257 - make non-connection-based connections restartable; r=mayhemer
MozReview-Commit-ID: 1hEk7mT6mzZ
2017-10-26 14:23:05 +08:00
Chris Peterson
4e9c1d3429 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3
2017-09-03 22:12:56 -07:00
Nicholas Nethercote
b7346a7502 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Nicholas Nethercote
723f585d9c Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.
2017-08-04 14:40:52 +10:00
Masatoshi Kimura
c0943e4f30 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G
2017-07-29 20:50:21 +09:00
Nicholas Nethercote
8b5bdf0867 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)
2017-07-12 15:13:37 +10:00
Nicholas Nethercote
4ce1e9c11f Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString
2017-06-20 19:19:52 +10:00
Nicholas Nethercote
4cbdad69e6 Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString
2017-06-20 19:19:05 +10:00
Nicholas Hurley
4fbb06c099 Bug 1360574 - Backout original fix to bug 1346392 r=mcmanus
MozReview-Commit-ID: 1ljoiCXciRq
2017-05-11 10:20:14 -07:00
3f3be00660 Bug 1357835 - Extend telemetry for http autentication dialog prompt to show the subresource cross-origin auth dialog prompt per suresource type. Also add a pre to putentially disable auth propts for the cross-origin images. r=mayhemer r=ckerschb r=francois 2017-05-09 12:36:21 +02:00
Gijs Kruitbosch
ce612711b6 Bug 1360842, r=valentin
MozReview-Commit-ID: B7uG3ShaGuH
2017-05-04 11:28:04 +01:00
Honza Bambas
7d9a122562 Bug 1345910 - Allow HTTP connection restart for the first connection-based authentication request in a round. r=mcmanus 2017-04-26 17:02:05 +02:00
Nicholas Hurley
d9a36ce13a Bug 1346392 - force non-spdy on sticky auth connections. r=dragana
MozReview-Commit-ID: IkYTVgetKsn
2017-03-28 17:15:23 -07:00
Wei-Cheng Pan
6e5f9205bd Bug 1310127 - Part 5: Use MOZ_MUST_USE in netwerk/protocol/http r=mayhemer
MozReview-Commit-ID: 9xtNZyavZtc
2017-01-12 17:49:03 +08:00
Wei-Cheng Pan
60a2861056 Bug 1310127 - Part 4: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus
This patch contains some changes that may alter control flows.

MozReview-Commit-ID: Kcc2DWJZ8L5
2016-12-28 14:43:47 +08:00
Wei-Cheng Pan
f9654c1dca Bug 1310127 - Part 2: Use MOZ_MUST_USE in netwerk/protocol/http r=Cykesiopka,mcmanus
Log failures or just ignore them, no control flow change.

MozReview-Commit-ID: D748DEjl3Fv
2016-12-27 19:05:13 +08:00
Sylvestre Ledru
fe74f041a1 Bug 1338086 - Remove useless else blocks in order to reduce complexity in netwerk/ r=dragana
MozReview-Commit-ID: 2TSxhHWmL2H
2017-02-09 11:21:38 +01:00
Andrea Marchesini
46a9207d60 Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Honza Bambas
4c4b8503c1 Bug 1320999 - Avoid double NTLM proxy auth prompt by not keeping nsHttpChannelAuthProvider::mProxyIdent when the sticky connection is threw away during NTLM WWW authentication prompt, r=jduell 2016-11-29 10:44:00 +01:00
Honza Bambas
775c6d17ce Bug 1315332 - Don't reuse the connection for conn-based auth schemes when asking user for credentials. r=mcmanus 2016-11-15 11:00:00 -05:00
Honza Bambas
c64aa7d6bd Bug 1309438 - Don't reuse sticky connection after authentication failure. r=jduell 2016-11-25 03:33:00 -05:00
Sebastian Hengst
ba8c4c8fda Backed out changeset 132bb5e7c5b8 (bug 1315332) for bustage. r=backout 2016-11-27 22:02:43 +01:00
Honza Bambas
17299fde33 Bug 1315332 - Don't reuse the connection for conn-based auth schemes when asking user for credentials, r=mcmanus 2016-11-27 21:24:43 +01:00
Honza Bambas
c4413a2fa8 Bug 1312695 - Let authprompt level reflect proxy security and not origin server security. r=mcmanus 2016-10-25 04:32:00 -04:00
Jan Horak
5089c65707 Bug 1277213 - Reset state after cancel. r=mayhemer 2016-07-28 10:09:32 -04:00
Jan Horak
a56656388f Bug 890908 - Move Negotiate auth off main thread. r=mayhemer 2016-07-14 03:32:00 -04:00
Dragana Damjanovic
6e72a11bb8 Bug 1230462 - Change the authentiation dialog message. r=mayhemer,dolske,margaret,tanvi 2016-06-06 01:06:00 +02:00
Carsten "Tomcat" Book
529f945807 Backed out changeset 490d3460a197 (bug 1230462) for test failures in test_modal_prompts.html 2016-06-05 11:26:57 +02:00
Dragana Damjanovic
570b31b4cc Bug 1230462 - Change the authentiation dialog message. r=mayhemer,dolske,margaret,tanvi 2016-06-03 09:09:00 +02:00
Carsten "Tomcat" Book
bc3f5ce221 Backed out changeset 1fe1c3b03d08 (bug 890908) on developer request 2016-06-03 05:51:06 +02:00
Jan Horak
74d18066d6 Bug 890908 - "Move Negotiate auth off main thread". r=mayhemer 2016-05-20 06:07:00 +02:00
Carsten "Tomcat" Book
32b42c0b0a Backed out changeset e3f130f1eb76 (bug 890908) for suspicion that something in this push caused failing Crashtests and Android/Valgrind issues on a CLOSED TREE 2016-05-23 11:37:57 +02:00
Jan Horak
a62f07ac7c Bug 890908 - "Move Negotiate auth off main thread". r=mayhemer 2016-05-20 06:07:00 +02:00
Adam Roach [:abr]
9d8e583d68 Bug 1266571 - Add telemetry to measure incidence of non-TLS use of HTTP AUTH. r=mayhemer 2016-04-30 17:58:34 -05:00
Andrea Marchesini
690ff75c6d Bug 1241565 - nsIHttpChannelInternal should be a builtinclass, r=honzab.moz 2016-01-22 11:55:54 +00:00
Andrea Marchesini
690125fc21 Bug 1221320 - XMLHttpRequest authentication should not require auth prompt dialog, r=honzab.moz 2015-12-30 18:47:55 +00:00
Honza Bambas
47f2c8795e Bug 1064378 - Don't rewrite custom Authorization header set on a channel by cached credential. r=jduell 2016-01-21 09:33:00 -05:00
Yoshi Huang
47c69d1edb Bug 1209162 - Create OriginAttributes subtypes. IGNORE IDL r=sicking. 2015-11-03 09:50:54 +08:00
Honza Bambas
42f7805c8f Bug 1213577 - Use OriginAttributes in nsHttpAuthManager, r=mcmanus 2015-10-29 10:43:00 +01:00
Jonas Sicking
bb0dc3507b Bug 1182571: Fix nsILoadInfo->GetContentPolicyType API to be less ambigious. Audit and fix all users of it. r=ckerschb 2015-10-19 11:14:54 -07:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Wes Kocher
4f2d5be924 Backed out 2 changesets (bug 1182571) for being a likely cause of the Android S4 errors
Backed out changeset e2b3064dcace (bug 1182571)
Backed out changeset 8153ae231d16 (bug 1182571)
2015-10-15 14:07:06 -07:00
Jonas Sicking
d5e39db15b Bug 1182571: Fix nsILoadInfo->GetContentPolicyType API to be less ambigious. Audit and fix all users of it. r=ckerschb 2015-10-15 12:18:20 -07:00
9035d111ab Bug 1202421 - Rename the network.auth.allow-subresource-auth pref. r=michal 2015-09-08 08:21:19 -07:00
Dragana Damjanovic
d373c2aacb Bug 979359 - Add telemetry to to collect stats about how often Http Authentication occurs and how often it is for top-level doc, cross-origin, etc. r=jduell 2015-08-27 07:50:00 -04:00
Birunthan Mohanathas
a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Emanuel Hoogeveen
b30abdc582 Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00