浏览代码

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

bel 9 年之前
父节点
当前提交
4b52bd5969
共有 1 个文件被更改,包括 1 次插入1 次删除
  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. */