mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V1.3 to HEAD (3005:3013)
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3005 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3013 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3336 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -849,6 +849,10 @@ public class FTPDataSession extends SrvSession implements Runnable
|
|||||||
disk.closeFile(this, tree, netFile);
|
disk.closeFile(this, tree, netFile);
|
||||||
netFile = null;
|
netFile = null;
|
||||||
|
|
||||||
|
// Commit the transaction now before notifying the client that the transfer is finished
|
||||||
|
|
||||||
|
endTransaction();
|
||||||
|
|
||||||
// Indicate that the file has been received
|
// Indicate that the file has been received
|
||||||
|
|
||||||
sendFTPResponse(226, "Closing data connection");
|
sendFTPResponse(226, "Closing data connection");
|
||||||
|
@@ -693,6 +693,25 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send an FTP command response
|
||||||
|
*
|
||||||
|
* @param msg String
|
||||||
|
* @exception IOException
|
||||||
|
*/
|
||||||
|
protected final void sendFTPResponse(String msg) throws IOException
|
||||||
|
{
|
||||||
|
|
||||||
|
// Output the FTP response
|
||||||
|
|
||||||
|
if (m_out != null)
|
||||||
|
{
|
||||||
|
m_out.write(msg);
|
||||||
|
m_out.write(CRLF);
|
||||||
|
m_out.flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process a user command
|
* Process a user command
|
||||||
*
|
*
|
||||||
@@ -2623,7 +2642,6 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
|||||||
|
|
||||||
DiskInterface disk = null;
|
DiskInterface disk = null;
|
||||||
TreeConnection tree = null;
|
TreeConnection tree = null;
|
||||||
NetworkFile netFile = null;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -2742,7 +2760,6 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
|||||||
|
|
||||||
DiskInterface disk = null;
|
DiskInterface disk = null;
|
||||||
TreeConnection tree = null;
|
TreeConnection tree = null;
|
||||||
NetworkFile netFile = null;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -2824,6 +2841,29 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
|||||||
sendFTPResponse(550, "Not implemented yet");
|
sendFTPResponse(550, "Not implemented yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process a features command
|
||||||
|
*
|
||||||
|
* @param req FTPRequest
|
||||||
|
* @exception IOException
|
||||||
|
*/
|
||||||
|
protected final void procFeatures(FTPRequest req) throws IOException
|
||||||
|
{
|
||||||
|
// Check if the user is logged in
|
||||||
|
|
||||||
|
if (isLoggedOn() == false)
|
||||||
|
{
|
||||||
|
sendFTPResponse(500, "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send back the list of features supported by this FTP server
|
||||||
|
|
||||||
|
sendFTPResponse( 211, "Features");
|
||||||
|
sendFTPResponse( "SIZE");
|
||||||
|
sendFTPResponse( 211, "End");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process a file size command
|
* Process a file size command
|
||||||
*
|
*
|
||||||
@@ -2854,7 +2894,7 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
|||||||
FTPPath ftpPath = generatePathForRequest(req, true);
|
FTPPath ftpPath = generatePathForRequest(req, true);
|
||||||
if (ftpPath == null)
|
if (ftpPath == null)
|
||||||
{
|
{
|
||||||
sendFTPResponse(500, "Invalid path");
|
sendFTPResponse(550, "Invalid path");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3560,6 +3600,12 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
|||||||
procAbort(ftpReq);
|
procAbort(ftpReq);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Return the list of features that this server supports
|
||||||
|
|
||||||
|
case FTPCommand.Feat:
|
||||||
|
procFeatures(ftpReq);
|
||||||
|
break;
|
||||||
|
|
||||||
// Unknown/unimplemented command
|
// Unknown/unimplemented command
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user