Browse Source

Set header value for fields without : to an empty string instead of NULL (see #318)

bel 9 years ago
parent
commit
4b52bd5969
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -6919,7 +6919,7 @@ parse_http_headers(char **buf, struct mg_request_info *ri)
 			if (dp[1] == '\n') {
 				/* \r\n */
 				ri->http_headers[i].name = *buf;
-				ri->http_headers[i].value = 0;
+				ri->http_headers[i].value = "";
 				*buf = dp;
 			} else {
 				/* stray \r. This is not valid. */