diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-18 15:25:49 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-18 15:25:49 +0000 |
commit | 568a09c220a706cb717f345a4da14e935dca1672 (patch) | |
tree | d860e5c54c216b82a02b79c4f1dbdc816926f5d2 /ex.c | |
parent | f87bf597ea711ef795b27d70fd5b992a80e021c8 (diff) |
fix requri construction
when we switched from one process to two, I introduced a small
optimisation: empty string are not send, so we receive NULL.
Constructing requri we need to make sure that relpath is not null.
Diffstat (limited to 'ex.c')
-rw-r--r-- | ex.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -208,7 +208,8 @@ launch_cgi(const char *spath, const char *relpath, const char *query, goto childerr; if (asprintf(&requri, "%s%s%s", spath, - (relpath != NULL && *relpath == '\0') ? "" : "/", relpath) == -1) + (relpath != NULL && *relpath == '\0') ? "" : "/", + (relpath != NULL ? relpath : "")) == -1) goto childerr; argv[0] = argv[1] = ex; |