1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-01 12:59:47 +02:00

add more verbose to log

This commit is contained in:
lxsang 2020-08-27 12:46:05 +02:00
parent 280ad920e9
commit 56806fb25b
3 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -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));

View File

@ -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);