Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
dd40eaa8
Commit
dd40eaa8
authored
Oct 22, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make WRW_WriteH() an internal http1_proto helper
parent
5a204298
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
22 deletions
+20
-22
cache.h
bin/varnishd/cache/cache.h
+0
-1
cache_wrw.c
bin/varnishd/cache/cache_wrw.c
+0
-17
cache_http1_proto.c
bin/varnishd/http1/cache_http1_proto.c
+20
-4
No files found.
bin/varnishd/cache/cache.h
View file @
dd40eaa8
...
@@ -959,7 +959,6 @@ void WRW_Reserve(struct worker *w, int *fd, struct vsl_log *, double t0);
...
@@ -959,7 +959,6 @@ void WRW_Reserve(struct worker *w, int *fd, struct vsl_log *, double t0);
unsigned
WRW_Flush
(
const
struct
worker
*
w
);
unsigned
WRW_Flush
(
const
struct
worker
*
w
);
unsigned
WRW_FlushRelease
(
struct
worker
*
w
,
uint64_t
*
pacc
);
unsigned
WRW_FlushRelease
(
struct
worker
*
w
,
uint64_t
*
pacc
);
unsigned
WRW_Write
(
const
struct
worker
*
w
,
const
void
*
ptr
,
int
len
);
unsigned
WRW_Write
(
const
struct
worker
*
w
,
const
void
*
ptr
,
int
len
);
unsigned
WRW_WriteH
(
const
struct
worker
*
w
,
const
txt
*
hh
,
const
char
*
suf
);
/* cache_session.c [SES] */
/* cache_session.c [SES] */
void
SES_Close
(
struct
sess
*
sp
,
enum
sess_close
reason
);
void
SES_Close
(
struct
sess
*
sp
,
enum
sess_close
reason
);
...
...
bin/varnishd/cache/cache_wrw.c
View file @
dd40eaa8
...
@@ -223,23 +223,6 @@ WRW_FlushRelease(struct worker *wrk, uint64_t *pacc)
...
@@ -223,23 +223,6 @@ WRW_FlushRelease(struct worker *wrk, uint64_t *pacc)
return
(
u
);
return
(
u
);
}
}
unsigned
WRW_WriteH
(
const
struct
worker
*
wrk
,
const
txt
*
hh
,
const
char
*
suf
)
{
unsigned
u
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
AN
(
wrk
->
wrw
->
wfd
);
AN
(
wrk
);
AN
(
hh
);
AN
(
hh
->
b
);
AN
(
hh
->
e
);
u
=
WRW_Write
(
wrk
,
hh
->
b
,
hh
->
e
-
hh
->
b
);
if
(
suf
!=
NULL
)
u
+=
WRW_Write
(
wrk
,
suf
,
-
1
);
return
(
u
);
}
unsigned
unsigned
WRW_Write
(
const
struct
worker
*
wrk
,
const
void
*
ptr
,
int
len
)
WRW_Write
(
const
struct
worker
*
wrk
,
const
void
*
ptr
,
int
len
)
{
{
...
...
bin/varnishd/http1/cache_http1_proto.c
View file @
dd40eaa8
...
@@ -519,6 +519,22 @@ HTTP1_DissectResponse(struct http *hp, struct http_conn *htc)
...
@@ -519,6 +519,22 @@ HTTP1_DissectResponse(struct http *hp, struct http_conn *htc)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
unsigned
http1_WrTxt
(
const
struct
worker
*
wrk
,
const
txt
*
hh
,
const
char
*
suf
)
{
unsigned
u
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
AN
(
wrk
);
AN
(
hh
);
AN
(
hh
->
b
);
AN
(
hh
->
e
);
u
=
WRW_Write
(
wrk
,
hh
->
b
,
hh
->
e
-
hh
->
b
);
if
(
suf
!=
NULL
)
u
+=
WRW_Write
(
wrk
,
suf
,
-
1
);
return
(
u
);
}
unsigned
unsigned
HTTP1_Write
(
const
struct
worker
*
w
,
const
struct
http
*
hp
,
const
int
*
hf
)
HTTP1_Write
(
const
struct
worker
*
w
,
const
struct
http
*
hp
,
const
int
*
hf
)
{
{
...
@@ -528,12 +544,12 @@ HTTP1_Write(const struct worker *w, const struct http *hp, const int *hf)
...
@@ -528,12 +544,12 @@ HTTP1_Write(const struct worker *w, const struct http *hp, const int *hf)
AN
(
hp
->
hd
[
hf
[
0
]].
b
);
AN
(
hp
->
hd
[
hf
[
0
]].
b
);
AN
(
hp
->
hd
[
hf
[
1
]].
b
);
AN
(
hp
->
hd
[
hf
[
1
]].
b
);
AN
(
hp
->
hd
[
hf
[
2
]].
b
);
AN
(
hp
->
hd
[
hf
[
2
]].
b
);
l
=
WRW_WriteH
(
w
,
&
hp
->
hd
[
hf
[
0
]],
" "
);
l
=
http1_WrTxt
(
w
,
&
hp
->
hd
[
hf
[
0
]],
" "
);
l
+=
WRW_WriteH
(
w
,
&
hp
->
hd
[
hf
[
1
]],
" "
);
l
+=
http1_WrTxt
(
w
,
&
hp
->
hd
[
hf
[
1
]],
" "
);
l
+=
WRW_WriteH
(
w
,
&
hp
->
hd
[
hf
[
2
]],
"
\r\n
"
);
l
+=
http1_WrTxt
(
w
,
&
hp
->
hd
[
hf
[
2
]],
"
\r\n
"
);
for
(
u
=
HTTP_HDR_FIRST
;
u
<
hp
->
nhd
;
u
++
)
for
(
u
=
HTTP_HDR_FIRST
;
u
<
hp
->
nhd
;
u
++
)
l
+=
WRW_WriteH
(
w
,
&
hp
->
hd
[
u
],
"
\r\n
"
);
l
+=
http1_WrTxt
(
w
,
&
hp
->
hd
[
u
],
"
\r\n
"
);
l
+=
WRW_Write
(
w
,
"
\r\n
"
,
-
1
);
l
+=
WRW_Write
(
w
,
"
\r\n
"
,
-
1
);
return
(
l
);
return
(
l
);
}
}
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