print request path

This commit is contained in:
wt
2025-04-15 12:09:27 +07:00
parent ed71a635c9
commit afa63acf85
4 changed files with 4 additions and 0 deletions
+1
View File
@@ -87,6 +87,7 @@ void *handle_request(void *param) {
close(ssl);
pthread_exit(0);
}
printf("%s %s %s\n", path, method, proto);
if (strcmp(method, "GET")) {
send_response(ssl, "405 Method Not Allowed", "text/plain", "Method Not Allowed", 18);
+1
View File
@@ -77,6 +77,7 @@ static void handle_request(int ssl, char *req) {
send_response(ssl, "400 Bad Request", "text/plain", "Bad Request", 11);
return;
}
printf("%s %s %s\n", path, method, proto);
if (strcmp(method, "GET")) {
send_response(ssl, "405 Method Not Allowed", "text/plain", "Method Not Allowed", 18);
+1
View File
@@ -93,6 +93,7 @@ void *handle_request(void *param) {
close(client_sock);
pthread_exit(0);
}
printf("%s %s %s\n", path, method, proto);
if (strcmp(method, "GET")) {
send_response(ssl, "405 Method Not Allowed", "text/plain", "Method Not Allowed", 18);
+1
View File
@@ -79,6 +79,7 @@ static void handle_request(SSL *ssl, char *req) {
send_response(ssl, "400 Bad Request", "text/plain", "Bad Request", 11);
return;
}
printf("%s %s %s\n", path, method, proto);
if (strcmp(method, "GET")) {
send_response(ssl, "405 Method Not Allowed", "text/plain", "Method Not Allowed", 18);