Commit 4e59feca authored by Geoff Simmons's avatar Geoff Simmons

add the -C CLI option

parent 0f476259
......@@ -58,6 +58,9 @@ OPTIONS
When writing to a file, append to it rather than overwrite it.
-C
Do all regular expression and string matching caseless.
-d
Start processing log records at the head of the log instead of the tail.
......
......@@ -76,4 +76,12 @@ if [ "$?" != "1" ]; then
exit 1
fi
echo "... -C"
CKSUM=$( ../varnishevent -C -q 'ReqURL ~ "_STATIC"' -r ${IN} -l ${LOG} | cksum)
if [ "$CKSUM" != '3256944209 830' ]; then
echo "ERROR: -q query unexpected cksum: $CKSUM"
exit 1
fi
exit 0
......@@ -617,7 +617,7 @@ main(int argc, char *argv[])
CONF_Init();
read_default_config();
while ((c = getopt(argc, argv, "adDhvVP:w:F:g:f:q:r:n:N:L:T:l:")) != -1) {
while ((c = getopt(argc, argv, "aCdDhvVP:w:F:g:f:q:r:n:N:L:T:l:")) != -1) {
switch (c) {
case 'a':
a_flag = 1;
......@@ -684,6 +684,7 @@ main(int argc, char *argv[])
break;
case 'L':
case 'T':
case 'C':
if ((errnum = VSL_Arg(vsl, c, optarg)) < 0) {
fprintf(stderr, "%s\n", VSL_Error(vsl));
usage(EXIT_FAILURE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment