aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/server.c b/server.c
index 1383974..d0e5e4b 100644
--- a/server.c
+++ b/server.c
@@ -308,8 +308,10 @@ handle_open_conn(struct pollfd *fds, struct client *c)
return;
}
- if (!trim_req_iri(c->req) || !parse_iri(c->req, &c->iri, &parse_err)) {
- start_reply(fds, c, BAD_REQUEST, parse_err);
+ if (!trim_req_iri(c->req, &parse_err)
+ || !parse_iri(c->req, &c->iri, &parse_err)) {
+ LOGI(c, "iri parse error: %s", parse_err);
+ start_reply(fds, c, BAD_REQUEST, "invalid request");
return;
}