macressler / alfresco-bulk-filesystem-import

Automatically exported from code.google.com/p/alfresco-bulk-filesystem-import
GNU Lesser General Public License v3.0
1 stars 0 forks source link

BulkFilesystemImportWebScript always redirects to the status page, which errors when calling the script via HTTP request with 401 unauthorized. #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Bulk Filesystem Import:
Branch: 4x
Tag: 1.2.1

What steps will reproduce the problem?
1. Call the bulk filesystem initiate web script via HTTP GET, passing the 
targetNodeRef or targetPath, sourceDirectory, and alf_ticket as URL parameters.

What is the expected output? What do you see instead?
As long as the URL parameters are correct, bulk import should succeed.
Instead, the web script always attempts to redirect to the status page 
(BulkFilesystemImportWebScript lines 170-172), which throws a red herring 
HTTP/1.1 401 Unauthorized error, even though the bulk import succeeded.

Please provide any additional information below.
Potentially add an additional URL parameter that disables redirects, or add a 
check for the existence of the alf_ticket parameter on the initiate request and 
add it as a URL parameter to the status web script request as well.

Original issue reported on code.google.com by cmser...@gmail.com on 9 Oct 2013 at 6:56

GoogleCodeExporter commented 9 years ago
This is expected behaviour (though unfortunate).

Basically the import tool must be initiated using HTTP basic auth (.../service) 
or Alfresco auth (.../wcservice) only, not using the alf_ticket query string 
parameter.  This is because alf_tickets are not client side state, and 
therefore don't survive redirects (which the tool makes use of).

It would be great if you were to raise a ticket against Alfresco, requesting 
that the Web Script framework offer a way for a Web Script to specify that it 
doesn't support the alf_ticket mechanism.  If you do that, please add the JIRA 
or support case # here, so others who run into this issue can track the status.

Original comment by pmo...@gmail.com on 9 Oct 2013 at 7:46