transaction.context.request.url.*
is wrong for an incoming HTTP request with a pathname starting with a double-slash
#3137
Labels
transaction.context.request.url.*
is wrong for an incoming HTTP request with a pathname starting with a double-slash. E.g.:repro
Apply this patch:
Then run:
node examples/trace-http.js
.The generated transaction includes:
details
The recent #3133 fixed a similar issue in the handling of
transaction.name
for this case. The issue there was that the request path, e.g.//foo/bar
, was used as a full URL in URL parsing (vianew URL(...)
or similar). However, thisreq.url
is the "request-target" in the HTTP/1.1 request line and not a full URL.The
transaction.context.request.url.*
value is calculated using theoriginal-url
module here:apm-agent-nodejs/lib/parsers.js
Line 27 in 34cc2a7
The text was updated successfully, but these errors were encountered: