diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-27 09:07:52 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-27 09:07:52 +0200 |
commit | 314fb761d144b160d3aeb72840c89e31c4f21a4a (patch) | |
tree | 0794190c7b9f541b3dced0b1f6b15979f447e3e5 /netwerk/protocol/http/PHttpChannelParams.h | |
parent | fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5 (diff) | |
parent | 2b9e0ca0bbea04fca6e0fd5079877d355f27c9b6 (diff) | |
download | UXP-e77592415d22557babff9c578e338f6f178cc6f7.tar UXP-e77592415d22557babff9c578e338f6f178cc6f7.tar.gz UXP-e77592415d22557babff9c578e338f6f178cc6f7.tar.lz UXP-e77592415d22557babff9c578e338f6f178cc6f7.tar.xz UXP-e77592415d22557babff9c578e338f6f178cc6f7.zip |
Merge branch 'master' into Basilisk-releasev2018.09.27
Diffstat (limited to 'netwerk/protocol/http/PHttpChannelParams.h')
-rw-r--r-- | netwerk/protocol/http/PHttpChannelParams.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/netwerk/protocol/http/PHttpChannelParams.h b/netwerk/protocol/http/PHttpChannelParams.h index 4df5c7832..b04f57306 100644 --- a/netwerk/protocol/http/PHttpChannelParams.h +++ b/netwerk/protocol/http/PHttpChannelParams.h @@ -98,7 +98,11 @@ struct ParamTraits<mozilla::net::nsHttpHeaderArray::nsEntry> static void Write(Message* aMsg, const paramType& aParam) { - WriteParam(aMsg, aParam.header); + if (aParam.headerNameOriginal.IsEmpty()) { + WriteParam(aMsg, aParam.header); + } else { + WriteParam(aMsg, aParam.headerNameOriginal); + } WriteParam(aMsg, aParam.value); switch (aParam.variety) { case mozilla::net::nsHttpHeaderArray::eVarietyUnknown: @@ -124,11 +128,18 @@ struct ParamTraits<mozilla::net::nsHttpHeaderArray::nsEntry> static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) { uint8_t variety; - if (!ReadParam(aMsg, aIter, &aResult->header) || + nsAutoCString header; + if (!ReadParam(aMsg, aIter, &header) || !ReadParam(aMsg, aIter, &aResult->value) || !ReadParam(aMsg, aIter, &variety)) return false; + mozilla::net::nsHttpAtom atom = mozilla::net::nsHttp::ResolveAtom(header); + aResult->header = atom; + if (!header.Equals(atom.get())) { + aResult->headerNameOriginal = header; + } + switch (variety) { case 0: aResult->variety = mozilla::net::nsHttpHeaderArray::eVarietyUnknown; |