]> git.ipfire.org Git - thirdparty/squid.git/commit
Do not mark successful FTP PUT entries with ENTRY_BAD_LENGTH (#1904)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Mon, 23 Sep 2024 09:31:36 +0000 (09:31 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 1 Oct 2024 13:25:47 +0000 (13:25 +0000)
commit620efbd5907753d01a1b764b9275ef4753b03399
tree1b47dc69209a63392209e91c300b761b21a1eb6a
parentea10f7de0a37282047630b2e84a52a5605269b26
Do not mark successful FTP PUT entries with ENTRY_BAD_LENGTH (#1904)

Since 2021 commit ba3fe8d, we explicitly mark complete responses and
treat all other responses as truncated. That commit missed a case where
the FTP server responds with 226 or 250 code after receiving the upload.
The bug affects HTTP PUT requests using ftp URI scheme.

Incorrect truncation marking adds an unwanted WITH_CLIENT %err_detail to
ERR_FTP_PUT_CREATED transaction records in access.log:

    201 PUT ftp://... ERR_FTP_PUT_CREATED/FTP_REPLY_CODE=226+WITH_CLIENT

Fixed code logs:

    201 PUT ftp://... ERR_FTP_PUT_CREATED/FTP_REPLY_CODE=226
src/clients/FtpGateway.cc