aboutsummaryrefslogtreecommitdiff
path: root/iri.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-27 15:05:16 +0000
committerOmar Polo <op@omarpolo.com>2021-01-27 15:05:16 +0000
commitc4f682f8559b184d64b04aece37d3d2980859832 (patch)
tree44900600164ef998b7663c2cd61eeac082dc35a5 /iri.c
parent72bbed91365401d14492dac426401476986c84cf (diff)
trim_req_iri: set error string
Diffstat (limited to 'iri.c')
-rw-r--r--iri.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/iri.c b/iri.c
index beba368..f7cb627 100644
--- a/iri.c
+++ b/iri.c
@@ -364,12 +364,14 @@ parse_iri(char *iri, struct iri *ret, const char **err_ret)
}
int
-trim_req_iri(char *iri)
+trim_req_iri(char *iri, const char **err)
{
char *i;
- if ((i = strstr(iri, "\r\n")) == NULL)
+ if ((i = strstr(iri, "\r\n")) == NULL) {
+ *err = "missing CRLF";
return 0;
+ }
*i = '\0';
return 1;
}