# HG changeset patch # Parent 736aa97ec422d0967065c679d4242448a876065e # User timeless@mozdev.org Bug 562539 deprecated conversion from string constant to char* in nsHttpTransaction::ParseHead r=jduell diff --git a/netwerk/protocol/http/src/nsHttpHeaderArray.cpp b/netwerk/protocol/http/src/nsHttpHeaderArray.cpp --- a/netwerk/protocol/http/src/nsHttpHeaderArray.cpp +++ b/netwerk/protocol/http/src/nsHttpHeaderArray.cpp @@ -130,7 +130,7 @@ nsHttpHeaderArray::VisitHeaders(nsIHttpH } void -nsHttpHeaderArray::ParseHeaderLine(char *line, nsHttpAtom *hdr, char **val) +nsHttpHeaderArray::ParseHeaderLine(const char *line, nsHttpAtom *hdr, char **val) { // // BNF from section 4.2 of RFC 2616: diff --git a/netwerk/protocol/http/src/nsHttpHeaderArray.h b/netwerk/protocol/http/src/nsHttpHeaderArray.h --- a/netwerk/protocol/http/src/nsHttpHeaderArray.h +++ b/netwerk/protocol/http/src/nsHttpHeaderArray.h @@ -73,7 +73,7 @@ public: // parse a header line, return the header atom and a pointer to the // header value (the substring of the header line -- do not free). - void ParseHeaderLine(char *line, nsHttpAtom *header=nsnull, char **value=nsnull); + void ParseHeaderLine(const char *line, nsHttpAtom *header=nsnull, char **value=nsnull); void Flatten(nsACString &, PRBool pruneProxyHeaders=PR_FALSE); diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.cpp b/netwerk/protocol/http/src/nsHttpResponseHead.cpp --- a/netwerk/protocol/http/src/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/src/nsHttpResponseHead.cpp @@ -163,7 +163,7 @@ nsHttpResponseHead::Parse(char *block) } void -nsHttpResponseHead::ParseStatusLine(char *line) +nsHttpResponseHead::ParseStatusLine(const char *line) { // // Parse Status-Line:: HTTP-Version SP Status-Code SP Reason-Phrase CRLF @@ -198,7 +198,7 @@ nsHttpResponseHead::ParseStatusLine(char } void -nsHttpResponseHead::ParseHeaderLine(char *line) +nsHttpResponseHead::ParseHeaderLine(const char *line) { nsHttpAtom hdr = {0}; char *val; diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.h b/netwerk/protocol/http/src/nsHttpResponseHead.h --- a/netwerk/protocol/http/src/nsHttpResponseHead.h +++ b/netwerk/protocol/http/src/nsHttpResponseHead.h @@ -101,10 +101,10 @@ public: nsresult Parse(char *block); // parse the status line. line must be null terminated. - void ParseStatusLine(char *line); + void ParseStatusLine(const char *line); // parse a header line. line must be null terminated. parsing is destructive. - void ParseHeaderLine(char *line); + void ParseHeaderLine(const char *line); // cache validation support methods nsresult ComputeFreshnessLifetime(PRUint32 *);