This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git

commit 8aad84f27741748b7f460af82d64b74a99a346af
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun May 26 15:01:35 2024 -0400

    [NET-730] Cannot connect to FTP server with HTTP proxy
---
 src/changes/changes.xml                                     | 1 +
 src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 167a9983..8f1e4772 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -70,6 +70,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Guard against 
polynomial regular expression used on uncontrolled data in 
VMSVersioningFTPEntryParser.REGEX.</action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Guard against 
polynomial regular expression used on uncontrolled data in 
IMAPReply.TAGGED_RESPONSE.</action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Guard against 
polynomial regular expression used on uncontrolled data in 
IMAPReply.UNTAGGED_RESPONSE.</action>
+      <action type="fix" issue="NET-730" dev="ggregory" due-to="Johannes 
Thalmair, Gary Gregory">Cannot connect to FTP server with HTTP proxy.</action>
       <!-- ADD -->
       <action type="add" issue="NET-726" dev="ggregory" due-to="PJ Fanning, 
Gary Gregory">Add protected getters to FTPSClient #204.</action>
       <action type="add" dev="ggregory" due-to="Gary Gregory">Add 
SubnetUtils.toString().</action> 
diff --git a/src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java 
b/src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java
index 5dc6bc8d..2bf35d3c 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java
@@ -194,6 +194,7 @@ public class FTPHTTPClient extends FTPClient {
             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);
         }
         output.write(CRLF);
 

Reply via email to