Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-vtstor
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
libvmod-vtstor
Commits
bdc32c9e
Commit
bdc32c9e
authored
Aug 22, 2016
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VRT_selecthttp now in the api
parent
b0154f02
Pipeline
#18
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
31 deletions
+3
-31
vmod_vtstor.c
src/vmod_vtstor.c
+3
-31
No files found.
src/vmod_vtstor.c
View file @
bdc32c9e
...
...
@@ -32,34 +32,6 @@
#include "vtstor.h"
/*
* VRT_selecthttp is not public in Varnish <= 4.0.3.
*/
static
struct
http
*
selecthttp
(
VRT_CTX
,
enum
gethdr_e
where
)
{
struct
http
*
hp
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
switch
(
where
)
{
case
HDR_REQ
:
hp
=
ctx
->
http_req
;
break
;
case
HDR_BEREQ
:
hp
=
ctx
->
http_bereq
;
break
;
case
HDR_BERESP
:
hp
=
ctx
->
http_beresp
;
break
;
case
HDR_RESP
:
hp
=
ctx
->
http_resp
;
break
;
default:
WRONG
(
"selecthttp 'where' invalid"
);
}
return
(
hp
);
}
VCL_VOID
__match_proto__
(
td_vmod_vtstor__init
)
vmod_vtstor__init
(
VRT_CTX
,
struct
vmod_vtstor_vtstor
**
vmip
,
const
char
*
vcl_name
,
VCL_INT
nbuckets
,
...
...
@@ -120,7 +92,7 @@ vmod_vtstor_store(VRT_CTX, struct vmod_vtstor_vtstor *vmi,
return
;
}
hp
=
selecthttp
(
ctx
,
hdr
->
where
);
hp
=
VRT_
selecthttp
(
ctx
,
hdr
->
where
);
CHECK_OBJ_NOTNULL
(
hp
,
HTTP_MAGIC
);
unsigned
u
,
l
=
hdr
->
what
[
0
];
...
...
@@ -140,7 +112,7 @@ vmod_vtstor_get(VRT_CTX, struct vmod_vtstor_vtstor *vmi, VCL_HEADER hdr)
AN
(
hdr
);
AN
(
hdr
->
what
);
hp
=
selecthttp
(
ctx
,
hdr
->
where
);
hp
=
VRT_
selecthttp
(
ctx
,
hdr
->
where
);
CHECK_OBJ_NOTNULL
(
hp
,
HTTP_MAGIC
);
unsigned
u
,
l
=
hdr
->
what
[
0
];
...
...
@@ -161,7 +133,7 @@ vmod_vtstor_delete(VRT_CTX, struct vmod_vtstor_vtstor *vmi, VCL_HEADER hdr)
AN
(
hdr
);
AN
(
hdr
->
what
);
hp
=
selecthttp
(
ctx
,
hdr
->
where
);
hp
=
VRT_
selecthttp
(
ctx
,
hdr
->
where
);
CHECK_OBJ_NOTNULL
(
hp
,
HTTP_MAGIC
);
unsigned
u
,
l
=
hdr
->
what
[
0
];
...
...
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