Author: fmui
Date: Mon Jun 23 12:28:49 2014
New Revision: 1604779
URL: http://svn.apache.org/r1604779
Log:
AtomPub server: fixed Location header
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java?rev=1604779&r1=1604778&r2=1604779&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ObjectService.java
Mon Jun 23 12:28:49 2014
@@ -292,7 +292,8 @@ public class ObjectService {
// set headers
String newObjectId = (objectIdHolder.getValue() == null ? objectId
: objectIdHolder.getValue());
- String location = compileUrl(compileBaseUrl(request,
repositoryId), RESOURCE_CONTENT, newObjectId);
+ String contentLocation = compileUrl(compileBaseUrl(request,
repositoryId), RESOURCE_CONTENT, newObjectId);
+ String location = compileUrl(compileBaseUrl(request,
repositoryId), RESOURCE_OBJECTBYID, newObjectId);
// set status
if (newObjectId.equals(objectId)) {
@@ -318,7 +319,7 @@ public class ObjectService {
// new version created -> CREATED
response.setStatus(HttpServletResponse.SC_CREATED);
}
- response.setHeader("Content-Location", location);
+ response.setHeader("Content-Location", contentLocation);
response.setHeader("Location", location);
}
}