projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix NULL ptr reference for HTTP proxy.
[pazpar2-moved-to-github.git]
/
src
/
http.c
diff --git
a/src/http.c
b/src/http.c
index
86f8dc2
..
62233b2
100644
(file)
--- a/
src/http.c
+++ b/
src/http.c
@@
-794,7
+794,8
@@
static int http_proxy(struct http_request *rq)
hp = http_header_append(c, hp,
"X-Pazpar2-Server-Port", server_port);
sprintf(server_via, "1.1 %s:%s (%s/%s)",
hp = http_header_append(c, hp,
"X-Pazpar2-Server-Port", server_port);
sprintf(server_via, "1.1 %s:%s (%s/%s)",
- ser->host, server_port, PACKAGE_NAME, PACKAGE_VERSION);
+ ser->host ? ser->host : "@",
+ server_port, PACKAGE_NAME, PACKAGE_VERSION);
hp = http_header_append(c, hp, "Via" , server_via);
hp = http_header_append(c, hp, "X-Forwarded-For", c->addr);
}
hp = http_header_append(c, hp, "Via" , server_via);
hp = http_header_append(c, hp, "X-Forwarded-For", c->addr);
}