diff options
Diffstat (limited to '')
| -rw-r--r-- | xs_url.h | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -196,7 +196,7 @@ xs_dict *xs_multipart_form_data(const char *payload, int p_size, const char *hea | |||
| 196 | if (fn != NULL) { | 196 | if (fn != NULL) { |
| 197 | /* p_var value is a list */ | 197 | /* p_var value is a list */ |
| 198 | /* if filename has no extension and content-type is image, attach extension to the filename */ | 198 | /* if filename has no extension and content-type is image, attach extension to the filename */ |
| 199 | if (strchr(fn, '.') == NULL && xs_startswith(ct, "image/")) { | 199 | if (strchr(fn, '.') == NULL && ct && xs_startswith(ct, "image/")) { |
| 200 | char *ext = strchr(ct, '/'); | 200 | char *ext = strchr(ct, '/'); |
| 201 | ext++; | 201 | ext++; |
| 202 | fn = xs_str_cat(xs_str_new(""), fn, ".", ext); | 202 | fn = xs_str_cat(xs_str_new(""), fn, ".", ext); |