Backed out 3 changesets (bug 1308104) for bustages on nsHttp.cpp . CLOSED TREE
Backed out changeset e78791b93526 (bug 1308104) Backed out changeset b5c1875c11c7 (bug 1308104) Backed out changeset 9c8433be706e (bug 1308104)
This commit is contained in:
@@ -665,7 +665,7 @@ bool PresShell::GetVerifyReflowEnable() {
|
|||||||
bool error = false;
|
bool error = false;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char* comma = strchr(flags, ',');
|
char* comma = PL_strchr(flags, ',');
|
||||||
if (comma) *comma = '\0';
|
if (comma) *comma = '\0';
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|||||||
@@ -1404,7 +1404,7 @@ nsCSSFrameConstructor::nsCSSFrameConstructor(Document* aDocument,
|
|||||||
if (flags) {
|
if (flags) {
|
||||||
bool error = false;
|
bool error = false;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char* comma = strchr(flags, ',');
|
char* comma = PL_strchr(flags, ',');
|
||||||
if (comma) *comma = '\0';
|
if (comma) *comma = '\0';
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ void nsBlockFrame::InitDebugFlags() {
|
|||||||
if (flags) {
|
if (flags) {
|
||||||
bool error = false;
|
bool error = false;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char* cm = strchr(flags, ',');
|
char* cm = PL_strchr(flags, ',');
|
||||||
if (cm) *cm = '\0';
|
if (cm) *cm = '\0';
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|||||||
@@ -2536,7 +2536,7 @@ nsStandardURL::Resolve(const nsACString& in, nsACString& out) {
|
|||||||
// locate result path
|
// locate result path
|
||||||
resultPath = PL_strstr(result, "://");
|
resultPath = PL_strstr(result, "://");
|
||||||
if (resultPath) {
|
if (resultPath) {
|
||||||
resultPath = strchr(resultPath + 3, '/');
|
resultPath = PL_strchr(resultPath + 3, '/');
|
||||||
if (resultPath) {
|
if (resultPath) {
|
||||||
net_CoalesceDirs(coalesceFlag, resultPath);
|
net_CoalesceDirs(coalesceFlag, resultPath);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -572,8 +572,8 @@ nsresult nsMIMEHeaderParamImpl::DoParameterInternal(
|
|||||||
// in quotes (quotes required even if lang is blank)
|
// in quotes (quotes required even if lang is blank)
|
||||||
if (caseB || (caseCStart && acceptContinuations)) {
|
if (caseB || (caseCStart && acceptContinuations)) {
|
||||||
// look for single quotation mark(')
|
// look for single quotation mark(')
|
||||||
const char* sQuote1 = strchr(valueStart, 0x27);
|
const char* sQuote1 = PL_strchr(valueStart, 0x27);
|
||||||
const char* sQuote2 = sQuote1 ? strchr(sQuote1 + 1, 0x27) : nullptr;
|
const char* sQuote2 = sQuote1 ? PL_strchr(sQuote1 + 1, 0x27) : nullptr;
|
||||||
|
|
||||||
// Two single quotation marks must be present even in
|
// Two single quotation marks must be present even in
|
||||||
// absence of charset and lang.
|
// absence of charset and lang.
|
||||||
@@ -751,7 +751,7 @@ nsresult internalDecodeRFC2047Header(const char* aHeaderVal,
|
|||||||
Is7bitNonAsciiString(aHeaderVal, strlen(aHeaderVal))))) {
|
Is7bitNonAsciiString(aHeaderVal, strlen(aHeaderVal))))) {
|
||||||
DecodeRFC2047Str(aHeaderVal, aDefaultCharset, aOverrideCharset, aResult);
|
DecodeRFC2047Str(aHeaderVal, aDefaultCharset, aOverrideCharset, aResult);
|
||||||
} else if (aEatContinuations &&
|
} else if (aEatContinuations &&
|
||||||
(strchr(aHeaderVal, '\n') || strchr(aHeaderVal, '\r'))) {
|
(PL_strchr(aHeaderVal, '\n') || PL_strchr(aHeaderVal, '\r'))) {
|
||||||
aResult = aHeaderVal;
|
aResult = aHeaderVal;
|
||||||
} else {
|
} else {
|
||||||
aEatContinuations = false;
|
aEatContinuations = false;
|
||||||
@@ -1167,9 +1167,7 @@ nsresult DecodeRFC2047Str(const char* aHeader,
|
|||||||
if (isLastEncodedWord) {
|
if (isLastEncodedWord) {
|
||||||
// See if it's all whitespace.
|
// See if it's all whitespace.
|
||||||
for (q = begin; q < p; ++q) {
|
for (q = begin; q < p; ++q) {
|
||||||
if (!strchr(" \t\r\n", *q)) {
|
if (!PL_strchr(" \t\r\n", *q)) break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1195,7 +1193,7 @@ nsresult DecodeRFC2047Str(const char* aHeader,
|
|||||||
charsetStart = p;
|
charsetStart = p;
|
||||||
charsetEnd = nullptr;
|
charsetEnd = nullptr;
|
||||||
for (q = p; *q != '?'; q++) {
|
for (q = p; *q != '?'; q++) {
|
||||||
if (*q <= ' ' || strchr(especials, *q)) {
|
if (*q <= ' ' || PL_strchr(especials, *q)) {
|
||||||
goto badsyntax;
|
goto badsyntax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ void LogHeaders(const char* lineStart) {
|
|||||||
if (StaticPrefs::network_http_sanitize_headers_in_logs() &&
|
if (StaticPrefs::network_http_sanitize_headers_in_logs() &&
|
||||||
(PL_strcasestr(buf.get(), "authorization: ") ||
|
(PL_strcasestr(buf.get(), "authorization: ") ||
|
||||||
PL_strcasestr(buf.get(), "proxy-authorization: "))) {
|
PL_strcasestr(buf.get(), "proxy-authorization: "))) {
|
||||||
char* p = strchr(buf.get(), ' ');
|
char* p = PL_strchr(buf.get(), ' ');
|
||||||
while (p && *++p) {
|
while (p && *++p) {
|
||||||
*p = '*';
|
*p = '*';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "nsHttpChunkedDecoder.h"
|
#include "nsHttpChunkedDecoder.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include "plstr.h"
|
||||||
|
|
||||||
#include "mozilla/Unused.h"
|
#include "mozilla/Unused.h"
|
||||||
|
|
||||||
@@ -134,9 +135,7 @@ nsresult nsHttpChunkedDecoder::ParseChunkRemaining(char* buf, uint32_t count,
|
|||||||
unsigned long parsedval; // could be 64 bit, could be 32
|
unsigned long parsedval; // could be 64 bit, could be 32
|
||||||
|
|
||||||
// ignore any chunk-extensions
|
// ignore any chunk-extensions
|
||||||
if ((p = strchr(buf, ';')) != nullptr) {
|
if ((p = PL_strchr(buf, ';')) != nullptr) *p = 0;
|
||||||
*p = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// mChunkRemaining is an uint32_t!
|
// mChunkRemaining is an uint32_t!
|
||||||
parsedval = strtoul(buf, &endptr, 16);
|
parsedval = strtoul(buf, &endptr, 16);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "nsFTPDirListingConv.h"
|
#include "nsFTPDirListingConv.h"
|
||||||
#include "nsMemory.h"
|
#include "nsMemory.h"
|
||||||
|
#include "plstr.h"
|
||||||
#include "mozilla/Logging.h"
|
#include "mozilla/Logging.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsEscape.h"
|
#include "nsEscape.h"
|
||||||
@@ -228,7 +229,7 @@ char* nsFTPDirListingConv::DigestBufferLines(char* aBuffer,
|
|||||||
list_state state;
|
list_state state;
|
||||||
|
|
||||||
// while we have new lines, parse 'em into application/http-index-format.
|
// while we have new lines, parse 'em into application/http-index-format.
|
||||||
while (line && (eol = strchr(line, nsCRT::LF))) {
|
while (line && (eol = PL_strchr(line, nsCRT::LF))) {
|
||||||
// yank any carriage returns too.
|
// yank any carriage returns too.
|
||||||
if (eol > line && *(eol - 1) == nsCRT::CR) {
|
if (eol > line && *(eol - 1) == nsCRT::CR) {
|
||||||
eol--;
|
eol--;
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ nsCommandLine::Init(int32_t argc, const char* const* argv, nsIFile* aWorkingDir,
|
|||||||
if (!dup) return NS_ERROR_OUT_OF_MEMORY;
|
if (!dup) return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
*dup = '-';
|
*dup = '-';
|
||||||
char* colon = strchr(dup, ':');
|
char* colon = PL_strchr(dup, ':');
|
||||||
if (colon) {
|
if (colon) {
|
||||||
*colon = '\0';
|
*colon = '\0';
|
||||||
appendArg(dup);
|
appendArg(dup);
|
||||||
@@ -381,7 +381,7 @@ nsCommandLine::Init(int32_t argc, const char* const* argv, nsIFile* aWorkingDir,
|
|||||||
char* dup = PL_strdup(curarg);
|
char* dup = PL_strdup(curarg);
|
||||||
if (!dup) return NS_ERROR_OUT_OF_MEMORY;
|
if (!dup) return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
char* eq = strchr(dup, '=');
|
char* eq = PL_strchr(dup, '=');
|
||||||
if (eq) {
|
if (eq) {
|
||||||
*eq = '\0';
|
*eq = '\0';
|
||||||
appendArg(dup);
|
appendArg(dup);
|
||||||
|
|||||||
Reference in New Issue
Block a user