Explorar o código

FTP pasv: Use request host when connecting server with http proxy.

Tatsuhiro Tsujikawa %!s(int64=14) %!d(string=hai) anos
pai
achega
f25e67b017
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/FtpNegotiationCommand.cc

+ 1 - 1
src/FtpNegotiationCommand.cc

@@ -722,7 +722,7 @@ bool FtpNegotiationCommand::sendTunnelRequest()
     int family = getSocket()->getPeerInfo(dataAddr);
     uri::UriStruct us;
     us.protocol = "ftp";
-    us.host = dataAddr.first;
+    us.host = getRequest()->getHost();
     us.port = pasvPort_;
     us.ipv6LiteralAddress = (family == AF_INET6);
     req->setUri(uri::construct(us));