Be careful with this one. I don't have full context, but this looks likely to be a real bug on some code paths and perhaps not a bug on others. We'll need to make sure that the patch for the broken code path doesn't break a currently working path. Specifically I'm worried about where \r\n might and might not show up after the if block shown here.
On Mon, Feb 12, 2024 at 10:15 AM Емельянов Юрий Владимирович <emelya...@krista.ru.invalid> wrote: > > see FTPHTTPClient.tunnelHandshake > > current code is: > > if (proxyUsername != null && proxyPassword != null) { > final String auth = proxyUsername + ":" + proxyPassword; > final String header = "Proxy-Authorization: Basic " + > Base64.getEncoder().encodeToString(auth.getBytes(charset)); > output.write(header.getBytes(charset)); > } > correct code is: > > if (proxyUsername != null && proxyPassword != null) { > final String auth = proxyUsername + ":" + proxyPassword; > final String header = "Proxy-Authorization: Basic " + > Base64.getEncoder().encodeToString(auth.getBytes(charset)); > output.write(header.getBytes(charset)); > *output.write(CRLF);* > } > -- Elliotte Rusty Harold elh...@ibiblio.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org