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
44c0c6ed
Commit
44c0c6ed
authored
May 21, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collect all aspect of resp.* creation together.
parent
e0c87d41
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
cache_center.c
bin/varnishd/cache/cache_center.c
+0
-8
cache_response.c
bin/varnishd/cache/cache_response.c
+9
-7
No files found.
bin/varnishd/cache/cache_center.c
View file @
44c0c6ed
...
...
@@ -267,14 +267,6 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
HTTP_Setup
(
req
->
resp
,
req
->
ws
,
req
->
vsl
,
HTTP_Resp
);
RES_BuildHttp
(
sp
);
if
(
req
->
obj
->
response
==
200
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
sp
))
{
req
->
wantbody
=
0
;
http_SetResp
(
req
->
resp
,
"HTTP/1.1"
,
304
,
"Not Modified"
);
http_Unset
(
req
->
resp
,
H_Content_Length
);
http_Unset
(
req
->
resp
,
H_Transfer_Encoding
);
}
VCL_deliver_method
(
sp
);
switch
(
req
->
handling
)
{
case
VCL_RET_DELIVER
:
...
...
bin/varnishd/cache/cache_response.c
View file @
44c0c6ed
...
...
@@ -124,7 +124,15 @@ RES_BuildHttp(const struct sess *sp)
http_SetHeader
(
req
->
resp
,
"Accept-Ranges: bytes"
);
}
if
(
req
->
res_mode
&
RES_CHUNKED
)
if
(
req
->
res_mode
&
RES_GUNZIP
)
http_Unset
(
req
->
resp
,
H_Content_Encoding
);
if
(
req
->
obj
->
response
==
200
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
sp
))
{
req
->
wantbody
=
0
;
http_SetResp
(
req
->
resp
,
"HTTP/1.1"
,
304
,
"Not Modified"
);
http_Unset
(
req
->
resp
,
H_Content_Length
);
}
else
if
(
req
->
res_mode
&
RES_CHUNKED
)
http_SetHeader
(
req
->
resp
,
"Transfer-Encoding: chunked"
);
http_Unset
(
req
->
resp
,
H_Date
);
...
...
@@ -248,12 +256,6 @@ RES_WriteObj(struct sess *sp)
http_GetHdr
(
req
->
http
,
H_Range
,
&
r
))
res_dorange
(
sp
,
r
,
&
low
,
&
high
);
/*
* Always remove C-E if client don't grok it
*/
if
(
req
->
res_mode
&
RES_GUNZIP
)
http_Unset
(
req
->
resp
,
H_Content_Encoding
);
WRW_Reserve
(
sp
->
wrk
,
&
sp
->
fd
,
sp
->
req
->
vsl
,
sp
->
req
->
t_resp
);
/*
...
...
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