From f25e67b0178511b26d55642f215a095321a169a8 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 9 Dec 2011 21:37:54 +0900 Subject: [PATCH] FTP pasv: Use request host when connecting server with http proxy. --- src/FtpNegotiationCommand.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc index 4bdc7ec9..7033715d 100644 --- a/src/FtpNegotiationCommand.cc +++ b/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));