Merged V4.0-BUG-FIX to HEAD

37502: Merged V3.4-BUG-FIX to V4.0-BUG-FIX (RECORD ONLY)
      37159: ALF-12541: Fix EOL.
      37172: Merged HEAD to V3.4-BUG-FIX:
         33880: ALF-12777 / ALF-14259: MMT should not install AMPs which override pre-existing files in the war file, unless -force is provided. The MMT is moving toward more of a validation phase (checks things, calculate changes) then an execution phase (makes the changes).
   37526: ALF-11027: update URLs to our Maven repos
   37554: Follow-on fix to ALF-9661 - do not fire update rule (onDeleteAssociation) if node also no longer exists
   - will fail with concurrency/retry error (=> "Attempt to follow reference ... to deleted node")
   - fix targeted for 4.0.3 (requires merge from V4.0-BUG-FIX to V4.0)
   - required by CloudSync (ALF-13941) - eg. last target( SSMN) also deletes source (SSD)
   37564: Pull out some bits to constants, so downstream classes can more easily configure themselves
   37571: ALF-14055: Merged V3.4-BUG-FIX to V4.0-BUG-FIX
      37570: ALF-13751: Catastrophic indexing performance when a repository containing 60,000 sites, all containing the admin user is synced with an LDAP server containing an admin user
         - made LDAP sync only apply incremental changes to zones (rather than removing all and adding all) and made it preserve the AUTH.ALF zone if it is already there, as that contains all the site group paths


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@37572 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-06-08 17:17:36 +00:00
parent 125f76c28e
commit f8de3d92e0

View File

@@ -68,6 +68,10 @@ public class LocalWebScriptConnectorServiceImpl implements RemoteConnectorServic
*/ */
private static Log logger = LogFactory.getLog(LocalWebScriptConnectorServiceImpl.class); private static Log logger = LogFactory.getLog(LocalWebScriptConnectorServiceImpl.class);
public static final String LOCAL_BASE_URL = "http://localhost:8080/alfresco/";
private static final String SERVICE_URL = "/service/";
public static final String LOCAL_SERVICE_URL = LOCAL_BASE_URL + "service/";
private WebScriptHelper helper; private WebScriptHelper helper;
private LocalAndRemoteAuthenticator auth; private LocalAndRemoteAuthenticator auth;
@@ -83,18 +87,16 @@ public class LocalWebScriptConnectorServiceImpl implements RemoteConnectorServic
public RemoteConnectorRequest buildRequest(String url, String method) public RemoteConnectorRequest buildRequest(String url, String method)
{ {
// Ensure we accept this URL // Ensure we accept this URL
String local = "http://localhost:8080/alfresco/"; if (url.startsWith(LOCAL_BASE_URL))
String service = "/service/";
if (url.startsWith(local))
{ {
// Good, that's probably us, make it a relative url // Good, that's probably us, make it a relative url
url = url.substring(local.length()-1); url = url.substring(LOCAL_BASE_URL.length()-1);
// Make sure it's a service one // Make sure it's a service one
if (url.startsWith(service)) if (url.startsWith(SERVICE_URL))
{ {
// Strip off and use // Strip off and use
url = url.substring(service.length()-1); url = url.substring(SERVICE_URL.length()-1);
} }
else else
{ {