You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A base URL that redirects drops every report; the README does not say redirects are not followed #25
A base URL that answers with a redirect loses every report, and the README does not say so.
Where:send() in src/main/java/software/stephenson/trace/TraceClient.java calls setFixedLengthStreamingMode(...) before writing the body. In streaming mode, HttpURLConnection cannot replay a POST to a redirect target. On a 301, getResponseCode() throws java.net.HttpRetryException: cannot retry due to redirection, in streaming mode. This is caught, so the report is dropped and a FINE [trace] could not deliver ... line is logged. The redirect target is never requested. report_aRedirectIsNotFollowedAndIsLoggedFine in PR #24 pins this on Java 8, 17 and 21.
Why it matters: a trace server that redirects http:// to https:// is a common setup. A program configured with the http:// URL sends nothing, and host loggers normally filter out FINE, so the failure is silent. The README "The wire format" section says only "A 201 is success; anything else is logged at FINE and dropped". That is literally true, but it does not tell an integrator that the base URL must be the final URL, with no redirects.
Options:
Documentation only: add a sentence to "The wire format" saying that redirects are not followed and that baseUrl must be the final https:// URL. This needs no contract change.
Behaviour change (maintainer decision, because it touches send()): follow 307/308, which keep the method and body, by re-posting to Location once. This would mean giving up fixed-length streaming or re-sending manually.
Activity