Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
htparser: Add a `Server' header if none previously present.
[ashd.git]
/
src
/
htparser.c
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);