Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-zipflow
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-zipflow
Commits
c78b66fa
Unverified
Commit
c78b66fa
authored
Oct 02, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle errors from zip_meta
parent
dbe5da15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
vmod_zipflow.c
src/vmod_zipflow.c
+8
-2
sub-body-form.vtc
src/vtc/sub-body-form.vtc
+23
-1
No files found.
src/vmod_zipflow.c
View file @
c78b66fa
...
...
@@ -616,6 +616,7 @@ vdp_zipsub_init(VRT_CTX, struct vdp_ctx *vdc, void **priv, struct objcore *oc)
struct
zipflow_request
*
zfr
;
struct
zipflow_top
*
zft
;
struct
req
*
req
;
int
r
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
(
void
)
vdc
;
...
...
@@ -633,10 +634,15 @@ vdp_zipsub_init(VRT_CTX, struct vdp_ctx *vdc, void **priv, struct objcore *oc)
if
(
req
->
resp_len
==
0
)
zfr
->
bundle
=
0
;
r
=
0
;
if
(
zfr
->
bundle
)
{
fill_meta
(
ctx
,
zfr
);
AZ
(
zip_meta
(
zft
->
zip
,
zfr
->
name
,
3
,
zfr
->
mode
,
(
uint32_t
)
zfr
->
atime
,
(
uint32_t
)
zfr
->
mtime
));
r
=
zip_meta
(
zft
->
zip
,
zfr
->
name
,
3
,
zfr
->
mode
,
(
uint32_t
)
zfr
->
atime
,
(
uint32_t
)
zfr
->
mtime
);
}
if
(
r
!=
0
)
{
VSLb
(
vdc
->
vsl
,
SLT_Error
,
"zipflow: zip_meta returned %d"
,
r
);
return
(
-
1
);
}
RFC2616_Weaken_Etag
(
req
->
resp
);
...
...
src/vtc/sub-body-form.vtc
View file @
c78b66fa
...
...
@@ -86,9 +86,31 @@ client c1 {
txreq
rxresp
expect resp.status == 500
} -run
} -start
client c2 {
txreq -body {
foo=/REQ/first/file
&foo=http://thishost/path/file1&
in valid
https://invalid
// https://
&bazz=https://thishost/another/file2
&zrrr=//thishost/file3
}
rxresphdrs
expect resp.status == 200
rxchunk
rxchunk
rxchunk
} -start
logexpect l1 -wait
# all default
shell "curl --data-raw \"/REQ/CURL/first http://thishost/path/file1 https://thishost/another/file2 //thishost/xxx/file3\" -so t.zip -H 'Host: ${v1_addr}' http://${v1_addr}:${v1_port}/ && unzip -Z t.zip"
client c1 -wait
client c2 -wait
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