Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

57701: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      57648: Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.1)
         57594: MNT-9770 : Merged from DEV to V4.1-BUG-FIX
          57002: MNT-9770 : WebDAV uploads over 2gb in size fails.
          Change int type to long, as content length from http request more than Integer.MAX_VALUE . 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61869 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 21:25:14 +00:00
parent 42c7df23b3
commit 2d53704b85
3 changed files with 42 additions and 10 deletions

View File

@@ -115,6 +115,29 @@ public class WebDAVHelper
private String m_urlPathPrefix;
private long sizeLimit = -1L;
/**
* This method sets a value for the limit. If the string does not {@link Long#parseLong(String) parse} to a
* java long.
*
* @param limit a String representing a valid Java long.
*/
public void setSizeLimitString(String limit)
{
// A string parameter is used here in order to not to require end users to provide a value for the limit in a property
// file. This results in the empty string being injected to this method.
long longLimit = -1L;
try
{
longLimit = Long.parseLong(limit);
} catch (NumberFormatException ignored)
{
// Intentionally empty
}
this.sizeLimit = longLimit;
}
/**
* Set the regular expression that will be applied to filenames during renames
* to detect whether clients are performing a renaming shuffle - common during
@@ -129,6 +152,14 @@ public class WebDAVHelper
this.m_renameShufflePattern = renameShufflePattern;
}
/**
* @return Return the limit size
*/
public long getSizeLimit()
{
return sizeLimit;
}
/**
* @return Return the authentication service
*/