diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-27 15:05:16 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-27 15:05:16 +0000 |
commit | c4f682f8559b184d64b04aece37d3d2980859832 (patch) | |
tree | 44900600164ef998b7663c2cd61eeac082dc35a5 /server.c | |
parent | 72bbed91365401d14492dac426401476986c84cf (diff) |
trim_req_iri: set error string
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } |