forbid GET requests with body content

Signed-off-by: Luminita Voicu <lumivo@amazon.com>
This commit is contained in:
Luminita Voicu
2021-07-07 11:12:04 +03:00
parent 83dcfdd22b
commit 7f3a14f16f
2 changed files with 16 additions and 8 deletions

View File

@@ -754,8 +754,7 @@ mod tests {
second_socket
.write_all(
b"GET /machine-config HTTP/1.1\r\n\
Content-Length: 20\r\n\
Content-Type: application/json\r\n\r\nwhatever second body",
Content-Type: application/json\r\n\r\n",
)
.unwrap();
@@ -766,8 +765,7 @@ mod tests {
second_server_request.request,
Request::try_from(
b"GET /machine-config HTTP/1.1\r\n\
Content-Length: 20\r\n\
Content-Type: application/json\r\n\r\nwhatever second body"
Content-Type: application/json\r\n\r\n"
)
.unwrap()
);
@@ -980,8 +978,7 @@ mod tests {
second_socket
.write_all(
b"GET /machine-config HTTP/1.1\r\n\
Content-Length: 20\r\n\
Content-Type: application/json\r\n\r\nwhatever second body",
Content-Type: application/json\r\n\r\n",
)
.unwrap();
@@ -992,8 +989,7 @@ mod tests {
second_server_request.request,
Request::try_from(
b"GET /machine-config HTTP/1.1\r\n\
Content-Length: 20\r\n\
Content-Type: application/json\r\n\r\nwhatever second body"
Content-Type: application/json\r\n\r\n"
)
.unwrap()
);