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
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)
vp
=
vcc_FindVar
(
tl
,
tl
->
t
,
1
,
"cannot be unset"
);
ERRCHK
(
tl
);
assert
(
vp
!=
NULL
);
if
(
vp
->
fmt
!=
STRING
||
vp
->
h
dr
==
NULL
)
{
if
(
vp
->
fmt
!=
STRING
||
vp
->
h
ttp
==
NULL
)
{
vsb_printf
(
tl
->
sb
,
"Only http header variables can be unset.
\n
"
);
vcc_ErrWhere
(
tl
,
tl
->
t
);
...
...
lib/libvcl/vcc_compile.h
View file @
384d6732
...
...
@@ -178,6 +178,7 @@ struct var {
unsigned
r_methods
;
const
char
*
lname
;
unsigned
w_methods
;
const
char
*
http
;
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)
v
->
r_methods
=
vh
->
r_methods
;
v
->
w_methods
=
vh
->
w_methods
;
v
->
fmt
=
STRING
;
v
->
h
dr
=
vh
->
hdr
;
v
->
h
ttp
=
vh
->
http
;
l
=
strlen
(
v
->
name
+
vh
->
len
)
+
1
;
bprintf
(
buf
,
"VRT_GetHdr(sp, %s,
\"\\
%03o%s:
\"
)"
,
v
->
hdr
,
(
unsigned
)
l
,
v
->
name
+
vh
->
len
);
bprintf
(
buf
,
"
\\
%03o%s:"
,
(
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
);
bprintf
(
buf
,
"VRT_SetHdr(sp, %s,
\"\\
%03o%s:
\"
, "
,
v
->
hdr
,
(
unsigned
)
l
,
v
->
name
+
vh
->
len
);
bprintf
(
buf
,
"VRT_SetHdr(sp, %s,
\"
%s
\"
, "
,
v
->
http
,
v
->
hdr
);
v
->
lname
=
TlDup
(
tl
,
buf
);
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