200 return content type
This commit is contained in:
@@ -22,7 +22,7 @@ int return200Request(int socket, unsigned char *content, SSL *ssl) {
|
|||||||
char *message = "";
|
char *message = "";
|
||||||
if (content != NULL) {
|
if (content != NULL) {
|
||||||
message = calloc(strlen((char *)content) + 128, sizeof(char));
|
message = calloc(strlen((char *)content) + 128, sizeof(char));
|
||||||
sprintf(message, "HTTP/1.1 200 OK\nContent-Length: %zu\nConnection: close\n\n%s",
|
sprintf(message, "HTTP/1.1 200 OK\nContent-Length: %zu\nContent-Type: text/html\nConnection: close\n\n%s",
|
||||||
strlen((char *)content), content);
|
strlen((char *)content), content);
|
||||||
} else { // Sending empty response
|
} else { // Sending empty response
|
||||||
message = calloc(128, sizeof(char));
|
message = calloc(128, sizeof(char));
|
||||||
|
|||||||
Reference in New Issue
Block a user