mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-19 01:09:58 +00:00
fixed some coding style
This commit is contained in:
parent
1e69b8c41d
commit
6663788612
@ -185,13 +185,16 @@ namespace proxy
|
|||||||
assert(len); // This should always be called with a least a byte left to parse
|
assert(len); // This should always be called with a least a byte left to parse
|
||||||
|
|
||||||
// remove "Referer" from http requst
|
// remove "Referer" from http requst
|
||||||
http_buff[len] = '\0';
|
http_buff[len] = 0;
|
||||||
char *start = strstr((char *)http_buff, "\nReferer:");
|
auto start = strstr((char *)http_buff, "\nReferer:");
|
||||||
if (start!=0)
|
if (start)
|
||||||
{
|
{
|
||||||
char *end = strstr(start+1, "\n");
|
auto end = strchr (start + 1, '\n');
|
||||||
strncpy(start, end, (char*)(http_buff + len) - end);
|
if (end)
|
||||||
len = len - (end - start);
|
{
|
||||||
|
strncpy(start, end, (char *)(http_buff + len) - end);
|
||||||
|
len -= (end - start);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (len > 0)
|
while (len > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user