mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
small changes for parsing GET url
This commit is contained in:
parent
d20925f230
commit
569e637eb1
1 changed files with 6 additions and 2 deletions
|
@ -254,8 +254,12 @@ function get_uri_prefix(s: string): string
|
||||||
{
|
{
|
||||||
local uri_prefix = get_first_slash(s);
|
local uri_prefix = get_first_slash(s);
|
||||||
local w = split_string(s[|uri_prefix|:], /\//);
|
local w = split_string(s[|uri_prefix|:], /\//);
|
||||||
if (|w| > 1)
|
local i = 0;
|
||||||
uri_prefix += w[0] + "/";
|
while ( i < (|w| - 1) )
|
||||||
|
{
|
||||||
|
uri_prefix += w[i] + "/";
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
return uri_prefix;
|
return uri_prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue