Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
384d6732
Commit
384d6732
authored
Mar 14, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Record the http-header-spec for wildcard'ed variables.
parent
4dac2303
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
vcc_action.c
lib/libvcl/vcc_action.c
+1
-1
vcc_compile.h
lib/libvcl/vcc_compile.h
+1
-0
vcc_var.c
lib/libvcl/vcc_var.c
+5
-5
No files found.
lib/libvcl/vcc_action.c
View file @
384d6732
...
@@ -166,7 +166,7 @@ parse_unset(struct vcc *tl)
...
@@ -166,7 +166,7 @@ parse_unset(struct vcc *tl)
vp
=
vcc_FindVar
(
tl
,
tl
->
t
,
1
,
"cannot be unset"
);
vp
=
vcc_FindVar
(
tl
,
tl
->
t
,
1
,
"cannot be unset"
);
ERRCHK
(
tl
);
ERRCHK
(
tl
);
assert
(
vp
!=
NULL
);
assert
(
vp
!=
NULL
);
if
(
vp
->
fmt
!=
STRING
||
vp
->
h
dr
==
NULL
)
{
if
(
vp
->
fmt
!=
STRING
||
vp
->
h
ttp
==
NULL
)
{
vsb_printf
(
tl
->
sb
,
vsb_printf
(
tl
->
sb
,
"Only http header variables can be unset.
\n
"
);
"Only http header variables can be unset.
\n
"
);
vcc_ErrWhere
(
tl
,
tl
->
t
);
vcc_ErrWhere
(
tl
,
tl
->
t
);
...
...
lib/libvcl/vcc_compile.h
View file @
384d6732
...
@@ -178,6 +178,7 @@ struct var {
...
@@ -178,6 +178,7 @@ struct var {
unsigned
r_methods
;
unsigned
r_methods
;
const
char
*
lname
;
const
char
*
lname
;
unsigned
w_methods
;
unsigned
w_methods
;
const
char
*
http
;
const
char
*
hdr
;
const
char
*
hdr
;
};
};
...
...
lib/libvcl/vcc_var.c
View file @
384d6732
...
@@ -61,15 +61,15 @@ vcc_Var_Wildcard(struct vcc *tl, const struct token *t, const struct symbol *wc)
...
@@ -61,15 +61,15 @@ vcc_Var_Wildcard(struct vcc *tl, const struct token *t, const struct symbol *wc)
v
->
r_methods
=
vh
->
r_methods
;
v
->
r_methods
=
vh
->
r_methods
;
v
->
w_methods
=
vh
->
w_methods
;
v
->
w_methods
=
vh
->
w_methods
;
v
->
fmt
=
STRING
;
v
->
fmt
=
STRING
;
v
->
h
dr
=
vh
->
hdr
;
v
->
h
ttp
=
vh
->
http
;
l
=
strlen
(
v
->
name
+
vh
->
len
)
+
1
;
l
=
strlen
(
v
->
name
+
vh
->
len
)
+
1
;
bprintf
(
buf
,
"VRT_GetHdr(sp, %s,
\"\\
%03o%s:
\"
)"
,
bprintf
(
buf
,
"
\\
%03o%s:"
,
(
unsigned
)
l
,
v
->
name
+
vh
->
len
);
v
->
hdr
,
(
unsigned
)
l
,
v
->
name
+
vh
->
len
);
v
->
hdr
=
TlDup
(
tl
,
buf
);
bprintf
(
buf
,
"VRT_GetHdr(sp, %s,
\"
%s
\"
)"
,
v
->
http
,
v
->
hdr
);
v
->
rname
=
TlDup
(
tl
,
buf
);
v
->
rname
=
TlDup
(
tl
,
buf
);
bprintf
(
buf
,
"VRT_SetHdr(sp, %s,
\"\\
%03o%s:
\"
, "
,
bprintf
(
buf
,
"VRT_SetHdr(sp, %s,
\"
%s
\"
, "
,
v
->
http
,
v
->
hdr
);
v
->
hdr
,
(
unsigned
)
l
,
v
->
name
+
vh
->
len
);
v
->
lname
=
TlDup
(
tl
,
buf
);
v
->
lname
=
TlDup
(
tl
,
buf
);
sym
=
VCC_AddSymbolTok
(
tl
,
t
,
SYM_VAR
);
sym
=
VCC_AddSymbolTok
(
tl
,
t
,
SYM_VAR
);
...
...
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