Explorar el Código

Fix copy/paste error in mg_get_header #530

bel2125 hace 7 años
padre
commit
a55ac0625e
Se han modificado 3 ficheros con 4 adiciones y 2 borrados
  1. 1 0
      CREDITS.md
  2. 1 1
      src/civetweb.c
  3. 2 1
      test/CMakeLists.txt

+ 1 - 0
CREDITS.md

@@ -4,6 +4,7 @@
 * Adam Bailey
 * Alan Somers
 * Alex Kozlov
+* AndreyArsov
 * bel2125
 * Ben M. Ward
 * BigJoe

+ 1 - 1
src/civetweb.c

@@ -3638,7 +3638,7 @@ mg_get_header(const struct mg_connection *conn, const char *name)
 	}
 	if (conn->connection_type == CONNECTION_TYPE_RESPONSE) {
 		return get_header(conn->response_info.http_headers,
-		                  conn->request_info.num_headers,
+		                  conn->response_info.num_headers,
 		                  name);
 	}
 	return NULL;

+ 2 - 1
test/CMakeLists.txt

@@ -179,7 +179,8 @@ civetweb_add_test(PublicFunc "Aux functions")
 civetweb_add_test(PublicServer "Check test environment")
 civetweb_add_test(PublicServer "Init library")
 civetweb_add_test(PublicServer "Start threads")
-civetweb_add_test(PublicServer "Minimal Server")
+civetweb_add_test(PublicServer "Minimal HTTP Server")
+civetweb_add_test(PublicServer "Minimal HTTPS Server")
 civetweb_add_test(PublicServer "Minimal HTTP Client")
 civetweb_add_test(PublicServer "Minimal HTTPS Client")
 civetweb_add_test(PublicServer "Start Stop HTTP Server")