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
0d276b43
Commit
0d276b43
authored
Jun 20, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce the http.protover field from double to uint8_t for space reasons.
parent
4f59702c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
cache.h
bin/varnishd/cache.h
+1
-1
cache_center.c
bin/varnishd/cache_center.c
+1
-1
cache_http.c
bin/varnishd/cache_http.c
+4
-4
rfc2616.c
bin/varnishd/rfc2616.c
+2
-2
No files found.
bin/varnishd/cache.h
View file @
0d276b43
...
...
@@ -171,7 +171,7 @@ struct http {
unsigned
char
conds
;
/* If-* headers present */
enum
httpwhence
logtag
;
int
status
;
double
protover
;
uint8_t
protover
;
unsigned
shd
;
/* Size of hd space */
txt
*
hd
;
...
...
bin/varnishd/cache_center.c
View file @
0d276b43
...
...
@@ -200,7 +200,7 @@ cnt_prepresp(struct sess *sp)
sp
->
wrk
->
res_mode
|=
RES_LEN
;
else
if
(
!
sp
->
wantbody
)
{
/* Nothing */
}
else
if
(
sp
->
http
->
protover
>=
1
.
1
)
{
}
else
if
(
sp
->
http
->
protover
>=
11
)
{
sp
->
wrk
->
res_mode
|=
RES_CHUNKED
;
}
else
{
sp
->
wrk
->
res_mode
|=
RES_EOF
;
...
...
bin/varnishd/cache_http.c
View file @
0d276b43
...
...
@@ -420,7 +420,7 @@ http_DoConnection(const struct http *hp)
unsigned
u
;
if
(
!
http_GetHdr
(
hp
,
H_Connection
,
&
p
))
{
if
(
hp
->
protover
<
1
.
1
)
if
(
hp
->
protover
<
11
)
return
(
"not HTTP/1.1"
);
return
(
NULL
);
}
...
...
@@ -640,11 +640,11 @@ http_ProtoVer(struct http *hp)
{
if
(
!
strcasecmp
(
hp
->
hd
[
HTTP_HDR_PROTO
].
b
,
"HTTP/1.0"
))
hp
->
protover
=
1
.
0
;
hp
->
protover
=
10
;
else
if
(
!
strcasecmp
(
hp
->
hd
[
HTTP_HDR_PROTO
].
b
,
"HTTP/1.1"
))
hp
->
protover
=
1
.
1
;
hp
->
protover
=
11
;
else
hp
->
protover
=
0
.
9
;
hp
->
protover
=
9
;
}
...
...
bin/varnishd/rfc2616.c
View file @
0d276b43
...
...
@@ -186,7 +186,7 @@ RFC2616_Body(const struct sess *sp)
hp
=
sp
->
wrk
->
beresp
;
if
(
hp
->
protover
<
1
.
1
&&
!
http_HdrIs
(
hp
,
H_Connection
,
"keep-alive"
))
if
(
hp
->
protover
<
11
&&
!
http_HdrIs
(
hp
,
H_Connection
,
"keep-alive"
))
sp
->
wrk
->
do_close
=
1
;
else
if
(
http_HdrIs
(
hp
,
H_Connection
,
"close"
))
sp
->
wrk
->
do_close
=
1
;
...
...
@@ -262,7 +262,7 @@ RFC2616_Body(const struct sess *sp)
return
(
BS_EOF
);
}
if
(
hp
->
protover
<
1
.
1
)
{
if
(
hp
->
protover
<
11
)
{
/*
* With no Connection header, assume EOF.
*/
...
...
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