httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r803166 - /httpd/mod_ftp/trunk/modules/ftp/mod_ftp_example.c
Date Tue, 11 Aug 2009 15:37:51 GMT
Author: wrowe
Date: Tue Aug 11 15:37:51 2009
New Revision: 803166

URL: http://svn.apache.org/viewvc?rev=803166&view=rev
Log:
The PING syntax error seemed to be the wrong response code.  The params
aren't unimplemented, they aren't allowed.

Modified:
    httpd/mod_ftp/trunk/modules/ftp/mod_ftp_example.c

Modified: httpd/mod_ftp/trunk/modules/ftp/mod_ftp_example.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/mod_ftp_example.c?rev=803166&r1=803165&r2=803166&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/mod_ftp_example.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/mod_ftp_example.c Tue Aug 11 15:37:51 2009
@@ -38,6 +38,9 @@
 {
     ftp_connection *fc = ftp_get_module_config(r->connection->conn_config);
 
+    /* Only handling SITE ECHO or SITE PING, let all others fall through
+     * to another registered command handler.
+     */
     if ((strncasecmp(arg, "ECHO", 4) && strncasecmp(arg, "PING", 4))
             || (arg[4] && arg[4] != ' '))
     	return DECLINED;
@@ -46,13 +49,13 @@
     {
         for (arg += 4; *arg == ' '; ++arg) 
             /* noop */;
+
         if (*arg) {
-            fc->response_notes = apr_pstrcat(r->pool, "Unknown PING parameter ",
-                                             arg, NULL);
-            return FTP_REPLY_COMMAND_NOT_IMPL_PARAM;
+            fc->response_notes = "SITE PING accepts no parameters";
+            return FTP_REPLY_SYNTAX_ERROR;
         }
-        else
-            fc->response_notes = "PONG";
+
+        fc->response_notes = "PONG";
     }
     else /* !strncasecmp(arg, "ECHO", 4) */
     {



Mime
View raw message