浏览代码

For "Range" requests to zip files, return "416 Range Not Satisfiable"

bel 8 年之前
父节点
当前提交
b3cdb1ba32
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -7990,7 +7990,7 @@ handle_static_file_request(struct mg_connection *conn,
 		if (filep->stat.is_gzipped) {
 			mg_send_http_error(
 			    conn,
-			    501,
+			    416, /* 416 = Range Not Satisfiable */
 			    "%s",
 			    "Error: Range requests in gzipped files are not supported");
 			(void)mg_fclose(