Bug 562539 - deprecated conversion from string constant to char* in nsHttpTransaction::ParseHead, r=jduell

This commit is contained in:
timeless@mozdev.org 2010-05-01 17:37:00 -07:00
parent 2db1cb7962
commit a29061d8a4
4 changed files with 10 additions and 6 deletions

View File

@ -130,7 +130,9 @@ nsHttpHeaderArray::VisitHeaders(nsIHttpHeaderVisitor *visitor)
}
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:

View File

@ -73,7 +73,9 @@ 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);

View File

@ -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 *line)
}
void
nsHttpResponseHead::ParseHeaderLine(char *line)
nsHttpResponseHead::ParseHeaderLine(const char *line)
{
nsHttpAtom hdr = {0};
char *val;

View File

@ -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 *);