Description

When calling the async_route() from event_route[xhttp:request], an error occurs.

ERROR: tm [t_lookup.c:769]: t_lookup_request(): too few headers
ERROR: async [async_sleep.c:238]: async_sleep(): cannot create the transaction

Reproduction

The problem is reproducible. Below is a fragment of the configuration file.
...
listen=tcp:192.168.3.115:8080
loadmodule "xhttp.so"
loadmodule "async.so"
...

event_route[xhttp:request] {
async_route("TEST", "2");
exit;
}

route[TEST] {
xhttp_reply("200", "OK", "text/html", "URL $hu\r\n");
exit;
}

Making a HTTP-request:

curl -X POST http://192.168.3.115:8080/test
-H "Content-Type: application/json"
-d '{"test": 1}'

Log Messages

messages.zip

Additional Information

#kamailio -v
version: kamailio 5.7.3 (x86_64/linux) e4d96b
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: e4d96b
compiled on 12:59:36 Nov 17 2023 with gcc 4.8.5

#cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3720@github.com>