projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3ca0687
)
Fix bad HTTP request causes a crash PAZ-1012
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 27 Jul 2015 11:35:59 +0000
(13:35 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 27 Jul 2015 11:35:59 +0000
(13:35 +0200)
src/http.c
patch
|
blob
|
history
diff --git
a/src/http.c
b/src/http.c
index
8a833c0
..
e3d05dc
100644
(file)
--- a/
src/http.c
+++ b/
src/http.c
@@
-840,13
+840,15
@@
void http_send_response(struct http_channel *ch)
struct http_buf *hb;
yaz_timing_stop(ch->yt);
struct http_buf *hb;
yaz_timing_stop(ch->yt);
- yaz_log(YLOG_LOG, "Response: %6.5f %d %s%s%s ",
- yaz_timing_get_real(ch->yt),
- iochan_getfd(ch->iochan),
- ch->request->path,
- *ch->request->search ? "?" : "",
- ch->request->search);
-
+ if (ch->request)
+ {
+ yaz_log(YLOG_LOG, "Response: %6.5f %d %s%s%s ",
+ yaz_timing_get_real(ch->yt),
+ iochan_getfd(ch->iochan),
+ ch->request->path,
+ *ch->request->search ? "?" : "",
+ ch->request->search);
+ }
assert(rs);
hb = http_serialize_response(ch, rs);
if (!hb)
assert(rs);
hb = http_serialize_response(ch, rs);
if (!hb)