This commit is contained in:
2025-12-12 21:45:29 +00:00
parent 83d1b91bfa
commit febf779301
2 changed files with 6 additions and 0 deletions
BIN
View File
Binary file not shown.
+6
View File
@@ -404,6 +404,7 @@ struct res_http_message forward_message_await_response(struct http_forward_info
sa.sin_port = htons(forward_info.port);
inet_pton(AF_INET, forward_info.host, &(sa.sin_addr));
int recv_size = connect(my_sock, (struct sockaddr *)&sa, sizeof(sa));
printf("CONNECT: Origin Server Connected\n");
// Send Message to Origin Server
@@ -424,6 +425,11 @@ struct res_http_message forward_message_await_response(struct http_forward_info
response_buffer = new_buffer;
}
}
printf("Last recv returned: %d\n", bytes_received);
printf("Buffer: \n%s\n", response_buffer);
printf("Total Received: %d\n", total_received);
response_buffer[total_received] = '\0';
printf("RECEIVE: Response Received from Origin Server (%d bytes)\n", total_received);