mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-13 00:04:19 +00:00
Minor string changes.
This commit is contained in:
parent
e0e12a8bd9
commit
66643e85ac
74 changed files with 895 additions and 889 deletions
|
|
@ -131,7 +131,7 @@ public:
|
|||
int proxyPort = 0;
|
||||
|
||||
String proxyURL (getenv ("http_proxy"));
|
||||
if (proxyURL.startsWithIgnoreCase (T("http://")))
|
||||
if (proxyURL.startsWithIgnoreCase ("http://"))
|
||||
{
|
||||
if (! decomposeURL (proxyURL, proxyName, proxyPath, proxyPort))
|
||||
return false;
|
||||
|
|
@ -217,20 +217,18 @@ public:
|
|||
StringArray lines;
|
||||
lines.addLines (responseHeader);
|
||||
|
||||
// NB - using charToString() here instead of just T(" "), because that was
|
||||
// causing a mysterious gcc internal compiler error...
|
||||
const int statusCode = responseHeader.fromFirstOccurrenceOf (String::charToString (' '), false, false)
|
||||
const int statusCode = responseHeader.fromFirstOccurrenceOf (" ", false, false)
|
||||
.substring (0, 3).getIntValue();
|
||||
|
||||
//int contentLength = findHeaderItem (lines, T("Content-Length:")).getIntValue();
|
||||
//bool isChunked = findHeaderItem (lines, T("Transfer-Encoding:")).equalsIgnoreCase ("chunked");
|
||||
//int contentLength = findHeaderItem (lines, "Content-Length:").getIntValue();
|
||||
//bool isChunked = findHeaderItem (lines, "Transfer-Encoding:").equalsIgnoreCase ("chunked");
|
||||
|
||||
String location (findHeaderItem (lines, "Location:"));
|
||||
|
||||
if (statusCode >= 300 && statusCode < 400
|
||||
&& location.isNotEmpty())
|
||||
{
|
||||
if (! location.startsWithIgnoreCase (T("http://")))
|
||||
if (! location.startsWithIgnoreCase ("http://"))
|
||||
location = "http://" + location;
|
||||
|
||||
if (levelsOfRedirection++ < 3)
|
||||
|
|
@ -357,7 +355,7 @@ private:
|
|||
|
||||
const String header (String::fromUTF8 ((const char*) buffer.getData()));
|
||||
|
||||
if (header.startsWithIgnoreCase (T("HTTP/")))
|
||||
if (header.startsWithIgnoreCase ("HTTP/"))
|
||||
return header.trimEnd();
|
||||
|
||||
return String::empty;
|
||||
|
|
@ -367,7 +365,7 @@ private:
|
|||
static bool decomposeURL (const String& url,
|
||||
String& host, String& path, int& port)
|
||||
{
|
||||
if (! url.startsWithIgnoreCase (T("http://")))
|
||||
if (! url.startsWithIgnoreCase ("http://"))
|
||||
return false;
|
||||
|
||||
const int nextSlash = url.indexOfChar (7, '/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue