Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
15e4f620
Commit
15e4f620
authored
Oct 28, 2011
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the somewhat correct parts
parent
831318ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
19 deletions
+27
-19
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+27
-19
No files found.
bin/varnishncsa/varnishncsa.c
View file @
15e4f620
...
...
@@ -105,8 +105,7 @@ static struct logline {
uint64_t
bitmap
;
/* Bitmap for regex matches */
VTAILQ_HEAD
(,
hdr
)
req_headers
;
/* Request headers */
VTAILQ_HEAD
(,
hdr
)
resp_headers
;
/* Response headers */
char
*
log1
;
/* How the request was handled (hit/miss/pass/pipe) */
// VTAILQ_HEAD(, hdr) vcl_log; /* vcl.log() entries */
VTAILQ_HEAD
(,
hdr
)
vcl_log
;
/* VLC_Log entries */
}
**
ll
;
struct
VSM_data
*
vd
;
...
...
@@ -222,8 +221,7 @@ static char *
vcl_log
(
struct
logline
*
l
,
const
char
*
name
)
{
struct
hdr
*
h
;
// JEJE
VTAILQ_FOREACH
(
h
,
&
l
->
resp_headers
,
list
)
{
VTAILQ_FOREACH
(
h
,
&
l
->
vcl_log
,
list
)
{
if
(
strcasecmp
(
h
->
key
,
name
)
==
0
)
{
return
h
->
value
;
break
;
...
...
@@ -261,6 +259,14 @@ clean_logline(struct logline *lp)
freez
(
h
->
value
);
freez
(
h
);
}
VTAILQ_FOREACH_SAFE
(
h
,
&
lp
->
vcl_log
,
list
,
h2
)
{
VTAILQ_REMOVE
(
&
lp
->
vcl_log
,
h
,
list
);
freez
(
h
->
key
);
freez
(
h
->
value
);
freez
(
h
);
}
#undef freez
memset
(
lp
,
0
,
sizeof
*
lp
);
}
...
...
@@ -484,22 +490,24 @@ collect_client(struct logline *lp, enum VSL_tag_e tag, unsigned spec,
case
SLT_VCL_Log
:
if
(
!
lp
->
active
)
break
;
lp
->
log1
=
trimline
(
ptr
,
end
);
/*
if (strncmp(ptr, "hit", len) == 0) {
lp->df_hitmiss = "hit";
lp->df_handling = "hit";
} else if (strncmp(ptr, "miss", len) == 0) {
lp->df_hitmiss = "miss";
lp->df_handling = "miss";
} else if (strncmp(ptr, "pass", len) == 0) {
lp->df_hitmiss = "miss";
lp->df_handling = "pass";
} else if (strncmp(ptr, "pipe", len) == 0) {
clean_logline(lp);
//lp->log1 = trimline(ptr, end);
// Extract key, value from logline.
split
=
strchr
(
ptr
,
':'
);
if
(
split
==
NULL
)
break
;
}
*/
struct
hdr
*
h
;
h
=
malloc
(
sizeof
(
struct
hdr
));
// XXX: what is this AN() business? probably important. :)
AN
(
h
);
AN
(
split
);
h
->
key
=
trimline
(
ptr
,
split
);
h
->
value
=
trimline
(
split
+
1
,
end
);
// put onto the linked list that is log entries.
VTAILQ_INSERT_HEAD
(
&
lp
->
vcl_log
,
h
,
list
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment