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
c5e9cf1c
Commit
c5e9cf1c
authored
Apr 27, 2020
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove VSB_QUOTE_GLOB, it was committed prematurely and does not
quite work the way it should.
parent
5721b7c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
49 deletions
+4
-49
vsb.h
include/vsb.h
+0
-1
vsb.c
lib/libvarnish/vsb.c
+4
-28
vsb_test.c
lib/libvarnish/vsb_test.c
+0
-20
No files found.
include/vsb.h
View file @
c5e9cf1c
...
...
@@ -84,7 +84,6 @@ void VSB_destroy(struct vsb **);
#define VSB_QUOTE_CSTR 8
#define VSB_QUOTE_UNSAFE 16
#define VSB_QUOTE_ESCHEX 32
#define VSB_QUOTE_GLOB 64
void
VSB_quote_pfx
(
struct
vsb
*
,
const
char
*
,
const
void
*
,
int
len
,
int
how
);
void
VSB_quote
(
struct
vsb
*
,
const
void
*
,
int
len
,
int
how
);
...
...
lib/libvarnish/vsb.c
View file @
c5e9cf1c
...
...
@@ -563,7 +563,7 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
nl
=
0
;
switch
(
*
q
)
{
case
'?'
:
if
(
how
&
(
VSB_QUOTE_CSTR
|
VSB_QUOTE_GLOB
)
)
if
(
how
&
VSB_QUOTE_CSTR
)
(
void
)
VSB_putc
(
s
,
'\\'
);
(
void
)
VSB_putc
(
s
,
*
q
);
break
;
...
...
@@ -571,10 +571,6 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
(
void
)
VSB_putc
(
s
,
*
q
);
break
;
case
'\\'
:
if
(
!
(
how
&
(
VSB_QUOTE_UNSAFE
)))
(
void
)
VSB_putc
(
s
,
'\\'
);
(
void
)
VSB_putc
(
s
,
*
q
);
break
;
case
'"'
:
if
(
!
(
how
&
VSB_QUOTE_UNSAFE
))
(
void
)
VSB_putc
(
s
,
'\\'
);
...
...
@@ -586,38 +582,18 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
}
else
if
(
how
&
(
VSB_QUOTE_NONL
|
VSB_QUOTE_UNSAFE
))
{
(
void
)
VSB_printf
(
s
,
"
\n
"
);
nl
=
1
;
}
else
if
(
how
&
VSB_QUOTE_GLOB
)
{
(
void
)
VSB_printf
(
s
,
"
\\\\
n"
);
}
else
{
(
void
)
VSB_printf
(
s
,
"
\\
n"
);
}
break
;
case
'\r'
:
if
(
how
&
VSB_QUOTE_GLOB
)
(
void
)
VSB_cat
(
s
,
"
\\\\
r"
);
else
(
void
)
VSB_cat
(
s
,
"
\\
r"
);
(
void
)
VSB_cat
(
s
,
"
\\
r"
);
break
;
case
'\t'
:
if
(
how
&
VSB_QUOTE_GLOB
)
(
void
)
VSB_cat
(
s
,
"
\\\\
t"
);
else
(
void
)
VSB_cat
(
s
,
"
\\
t"
);
(
void
)
VSB_cat
(
s
,
"
\\
t"
);
break
;
case
'\v'
:
if
(
how
&
VSB_QUOTE_GLOB
)
(
void
)
VSB_cat
(
s
,
"
\\\\
v"
);
else
(
void
)
VSB_cat
(
s
,
"
\\
v"
);
break
;
case
'['
:
case
']'
:
case
'{'
:
case
'}'
:
case
'*'
:
if
(
how
&
VSB_QUOTE_GLOB
)
(
void
)
VSB_putc
(
s
,
'\\'
);
(
void
)
VSB_putc
(
s
,
*
q
);
(
void
)
VSB_cat
(
s
,
"
\\
v"
);
break
;
default:
/* XXX: Implement VSB_QUOTE_JSON */
...
...
lib/libvarnish/vsb_test.c
View file @
c5e9cf1c
...
...
@@ -16,26 +16,6 @@ struct tc {
static
struct
tc
tcs
[]
=
{
{
VSB_QUOTE_GLOB
,
"abcdefghijklmnopqrstvwxyz"
,
"abcdefghijklmnopqrstvwxyz"
},
{
VSB_QUOTE_GLOB
,
"ABCDEFGHIJKLMNOPQRSTVWXYZ"
,
"ABCDEFGHIJKLMNOPQRSTVWXYZ"
},
{
VSB_QUOTE_GLOB
,
"01234567789"
,
"01234567789"
},
{
VSB_QUOTE_GLOB
,
"abcde[f-g]{h,i,j}
\\
l?*xyz"
,
"abcde
\\
[f-g
\\
]
\\
{h,i,j
\\
}
\\\\
l
\\
?
\\
*xyz"
},
{
VSB_QUOTE_GLOB
,
"0123
\t
\"\r\v\n
'"
,
"0123
\\\\
t
\\\"\\\\
r
\\\\
v
\\\\
n'"
},
{
0
,
NULL
,
NULL
}
};
...
...
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