diff --git a/dist/antd-1.0.5b.tar.gz b/dist/antd-1.0.5b.tar.gz index 27fb437..7005fb9 100644 Binary files a/dist/antd-1.0.5b.tar.gz and b/dist/antd-1.0.5b.tar.gz differ diff --git a/http_server.c b/http_server.c index 0ee2db4..3b507b9 100644 --- a/http_server.c +++ b/http_server.c @@ -336,6 +336,7 @@ void *accept_request(void *data) //server_config.connection++; read_buf(rq->client, buf, sizeof(buf)); line = buf; + LOG("Request (%d): %s", rq->client->sock,line); // get the method string token = strsep(&line, " "); if (!line) @@ -770,7 +771,7 @@ void *decode_request_header(void *data) // dirty fix, wait for message to be sent // 100 ms sleep usleep(100000); - return antd_create_task(NULL, (void *)rq, NULL,rq->client->last_io);; + return antd_create_task(NULL, (void *)rq, NULL,rq->client->last_io); } } @@ -800,7 +801,7 @@ void *decode_request_header(void *data) //if(line) free(line); memset(buf, 0, sizeof(buf)); strcat(buf, url); - LOG("Original query: %s", url); + LOG("Original query (%d): %s", rq->client->sock, url); query = apply_rules(pcnf->rules, host, buf); LOG("Processed query: %s", query); dput(rq->request, "RESOURCE_PATH", url_decode(buf)); diff --git a/httpd.c b/httpd.c index fd52b4f..226c56d 100644 --- a/httpd.c +++ b/httpd.c @@ -201,7 +201,7 @@ static void* antd_monitor(port_config_t* pcnf) if (client_name.sin_family == AF_INET) { client_ip = inet_ntoa(client_name.sin_addr); - LOG("Connect to client IP: %s on port:%d", client_ip, pcnf->port); + LOG("Connect to client IP: %s on port:%d (%d)", client_ip, pcnf->port, client_sock); // ip address dput(xheader, "REMOTE_ADDR", (void *)strdup(client_ip)); //LOG("socket: %d\n", client_sock);