mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-09 19:20:41 +03:00
Merge pull request #1062 from dnobori/200101_impr_url_log_spacing
Merge pull request #1062: Improvement: Add a space character between URL and other tokens in the packet log format.
This commit is contained in:
commit
eeec9a82f6
@ -1243,12 +1243,19 @@ void AddLogBufToStr(BUF *b, char *name, char *value)
|
||||
void MakeSafeLogStr(char *str)
|
||||
{
|
||||
UINT i, len;
|
||||
bool is_http = false;
|
||||
// Validate arguments
|
||||
if (str == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (str[0] == 'h' && str[1] == 't' && str[2] == 't' && str[3] == 'p' &&
|
||||
((str[4] == 's' && str[5] == ':') || (str[4] == ':')))
|
||||
{
|
||||
is_http = true;
|
||||
}
|
||||
|
||||
EnPrintableAsciiStr(str, '?');
|
||||
|
||||
len = StrLen(str);
|
||||
@ -1260,7 +1267,10 @@ void MakeSafeLogStr(char *str)
|
||||
}
|
||||
else if (str[i] == ' ')
|
||||
{
|
||||
str[i] = '_';
|
||||
if (is_http == false)
|
||||
{
|
||||
str[i] = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2007,8 +2017,6 @@ void ReplaceForCsv(char *str)
|
||||
return;
|
||||
}
|
||||
|
||||
// If there are blanks, trim it
|
||||
Trim(str);
|
||||
len = StrLen(str);
|
||||
|
||||
for (i = 0;i < len;i++)
|
||||
|
Loading…
Reference in New Issue
Block a user