From 11dfec1ba9dca16f986d100fd7aacd6243d03ee2 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 4 Jul 2012 07:19:48 +0000
Subject: [PATCH] Fix Chrome solution. Per RFC3659, the correct response for
 "Good command, but no size for you" is 550, not 500 or 501 (these indicate an
 inability to parse the command).

This works with Chrome.
---
 src/sbbs3/ftpsrvr.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c
index fa712727ed..9476df4979 100644
--- a/src/sbbs3/ftpsrvr.c
+++ b/src/sbbs3/ftpsrvr.c
@@ -3700,8 +3700,7 @@ static void ctrl_thread(void* arg)
 				&& !stricmp(p,startup->index_file_name)
 				&& !delecmd) {
 				if(getsize) {
-					/* Size not available for dynamically generated files */
-					sockprintf(sock, "213 0"); /* report size of 0 to be make Google Chrome happy */
+					sockprintf(sock, "550 Size not available for dynamically generated files");
 					continue;
 				}
 				if((fp=fopen(ftp_tmpfname(fname,"ndx",sock),"w+b"))==NULL) {
@@ -3816,8 +3815,7 @@ static void ctrl_thread(void* arg)
 				&& !delecmd) {
 				success=TRUE;
 				if(getsize) {
-					/* Size not available for dynamically generated files */
-					sockprintf(sock, "213 0"); /* report size of 0 to be make Google Chrome happy */
+					sockprintf(sock, "550 Size not available for dynamically generated files");
 					continue;
 				}
 				else if(getdate)
-- 
GitLab