Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18fb436
)
htparser: Add a `Server' header if none previously present.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 4 Oct 2010 22:39:30 +0000
(
00:39
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 4 Oct 2010 22:39:30 +0000
(
00:39
+0200)
src/htparser.c
patch
|
blob
|
blame
|
history
diff --git
a/src/htparser.c
b/src/htparser.c
index
4325e97
..
33ceb49
100644
(file)
--- a/
src/htparser.c
+++ b/
src/htparser.c
@@
-272,6
+272,9
@@
void serve(FILE *in, struct conn *conn)
if((resp = parseresp(out)) == NULL)
break;
replstr(&resp->ver, req->ver);
+
+ if(!getheader(resp, "server"))
+ headappheader(resp, "Server", sprintf3("ashd/%s", VERSION));
if(!strcmp(req->ver, "HTTP/1.0")) {
writeresp(in, resp);