fix: correct HTTP response syntax

main
Sean McBride 4 years ago
parent 8d1b447e74
commit 853382dcda

@ -105,11 +105,11 @@ typedef void (*mod_libc_fn_t)(int32_t, int32_t);
#define HTTP_MAX_HEADER_VALUE_LENGTH 64
#define HTTP_RESPONSE_200_OK "HTTP/1.1 200 OK\r\n"
#define HTTP_RESPONSE_CONTENT_LENGTH "Content-length: "
#define HTTP_RESPONSE_CONTENT_LENGTH_TERMINATOR " \r\n\r\n" /* content body follows this */
#define HTTP_RESPONSE_CONTENT_LENGTH "Content-Length: "
#define HTTP_RESPONSE_CONTENT_LENGTH_TERMINATOR "\r\n\r\n" /* content body follows this */
#define HTTP_RESPONSE_CONTENT_TYPE "Content-type: "
#define HTTP_RESPONSE_CONTENT_TYPE "Content-Type: "
#define HTTP_RESPONSE_CONTENT_TYPE_PLAIN "text/plain"
#define HTTP_RESPONSE_CONTENT_TYPE_TERMINATOR " \r\n"

@ -181,7 +181,7 @@ sandbox_build_and_send_client_response(struct sandbox *sandbox)
assert(response_cursor < sandbox->request_length);
/* Move the Sandbox's Data after the HTTP Response Data */
memmove(sandbox->request_response_data + response_cursor - 1,
memmove(sandbox->request_response_data + response_cursor,
sandbox->request_response_data + sandbox->request_length, body_size);
response_cursor += body_size;

Loading…
Cancel
Save