diff options
author | dnobori <da.git@softether.co.jp> | 2014-06-06 01:53:20 +0400 |
---|---|---|
committer | dnobori <da.git@softether.co.jp> | 2014-06-06 01:53:20 +0400 |
commit | 719ee999d6c6418b3e9f4afb904387700637009f (patch) | |
tree | c337288d68f4a129053d098f1f64269c699a4490 /src/Cedar/Logging.c | |
parent | 7839d2939e5336bdf492041f1c2ed564444d7a62 (diff) |
v4.07-9448-rtm
Diffstat (limited to 'src/Cedar/Logging.c')
-rw-r--r-- | src/Cedar/Logging.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/Cedar/Logging.c b/src/Cedar/Logging.c index 21529121..139c6fcc 100644 --- a/src/Cedar/Logging.c +++ b/src/Cedar/Logging.c @@ -1333,16 +1333,23 @@ char *BuildHttpLogStr(HTTPLOG *h) b = NewBuf();
- // URL generation
- if (h->Port == 80)
+ if (StartWith(h->Path, "http://"))
{
- Format(url, sizeof(url), "http://%s%s",
- h->Hostname, h->Path);
+ StrCpy(url, sizeof(url), h->Path);
}
else
{
- Format(url, sizeof(url), "http://%s:%u%s",
- h->Hostname, h->Port, h->Path);
+ // URL generation
+ if (h->Port == 80)
+ {
+ Format(url, sizeof(url), "http://%s%s",
+ h->Hostname, h->Path);
+ }
+ else
+ {
+ Format(url, sizeof(url), "http://%s:%u%s",
+ h->Hostname, h->Port, h->Path);
+ }
}
AddLogBufToStr(b, "HttpMethod", h->Method);
|