159 |
|
putline("Host: " + url.getAddress() + ':' + port.str()); |
160 |
|
} |
161 |
|
|
162 |
< |
if (referer != "") |
162 |
> |
if (!referer.empty()) |
163 |
|
{ |
164 |
|
putline("Referer: " + referer); |
165 |
|
} |
196 |
|
|
197 |
|
number >> response; |
198 |
|
|
199 |
< |
if (response < ok) do line = getline(); while (line != ""); |
199 |
> |
if (response < ok) do line = getline(); while (!line.empty()); |
200 |
|
} |
201 |
|
while (response < ok); |
202 |
|
|
204 |
|
{ |
205 |
|
line = getline(); |
206 |
|
|
207 |
< |
if (line != "") |
207 |
> |
if (!line.empty()) |
208 |
|
{ |
209 |
|
unsigned colon(line.find(':')); |
210 |
|
string field(line.substr(0, colon)), value(line.substr(colon + 1)); |
231 |
|
} |
232 |
|
} |
233 |
|
} |
234 |
< |
while (line != ""); |
234 |
> |
while (!line.empty()); |
235 |
|
|
236 |
|
switch (response) |
237 |
|
{ |
280 |
|
|
281 |
|
closesocket(http); |
282 |
|
|
283 |
– |
type = ""; |
283 |
|
length = 0; |
285 |
– |
location = ""; |
284 |
|
|
285 |
+ |
type.erase(); |
286 |
+ |
location.erase(); |
287 |
|
page.clear(); |
288 |
|
page.str(""); |
289 |
|
|