summaryrefslogtreecommitdiff
path: root/xs_httpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'xs_httpd.h')
-rw-r--r--xs_httpd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xs_httpd.h b/xs_httpd.h
index e01b660..3eacc5f 100644
--- a/xs_httpd.h
+++ b/xs_httpd.h
@@ -236,12 +236,12 @@ xs_dict *xs_httpd_request(FILE *f, xs_str **payload, int *p_size)
236 236
237 v = xs_dict_get(req, "content-type"); 237 v = xs_dict_get(req, "content-type");
238 238
239 if (v && strcmp(v, "application/x-www-form-urlencoded") == 0) { 239 if (*payload && v && strcmp(v, "application/x-www-form-urlencoded") == 0) {
240 xs *upl = xs_url_dec(*payload); 240 xs *upl = xs_url_dec(*payload);
241 p_vars = xs_url_vars(upl); 241 p_vars = xs_url_vars(upl);
242 } 242 }
243 else 243 else
244 if (v && xs_startswith(v, "multipart/form-data")) { 244 if (*payload && v && xs_startswith(v, "multipart/form-data")) {
245 p_vars = _xs_multipart_form_data(*payload, *p_size, v); 245 p_vars = _xs_multipart_form_data(*payload, *p_size, v);
246 } 246 }
247 else 247 else