Skip to content

Commit

Permalink
Fixing returned URIs for create endpoints per: https://www.pivotaltra…
Browse files Browse the repository at this point in the history
  • Loading branch information
ajs6f committed Mar 26, 2013
1 parent 72fb055 commit c8cefbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -223,7 +223,7 @@ public Response addDatastream(@PathParam("pid")
checksumType, checksum);
}
session.save();
return created(uriInfo.getAbsolutePath()).build();
return created(uriInfo.getRequestUri()).build();
} finally {
session.logout();
}
Expand Down Expand Up @@ -292,7 +292,7 @@ public Response modifyDatastream(@PathParam("pid")
datastreamService.createDatastreamNode(session, dsPath, contentType
.toString(), requestBodyStream);
session.save();
return created(uriInfo.getAbsolutePath()).build();
return created(uriInfo.getRequestUri()).build();
} finally {
session.logout();
}
Expand Down
Expand Up @@ -60,7 +60,7 @@ public Response registerObjectNamespace(@PathParam("prefix")
} finally {
session.logout();
}
return created(uriInfo.getAbsolutePath()).build();
return created(uriInfo.getRequestUri()).build();
}

/**
Expand All @@ -84,7 +84,7 @@ public Response registerObjectNamespaces(final NamespaceListing nses)
} finally {
session.logout();
}
return created(uriInfo.getAbsolutePath()).build();
return created(uriInfo.getRequestUri()).build();
}

/**
Expand Down
Expand Up @@ -81,7 +81,7 @@ public Response modify(@PathParam("pid")
try {
// TODO do something with awful mess of fcrepo3 query params
session.save();
return created(uriInfo.getAbsolutePath()).build();
return created(uriInfo.getRequestUri()).build();
} finally {
session.logout();
}
Expand All @@ -106,7 +106,7 @@ public Response ingest(@PathParam("pid")
objectService.createObjectNode(session, pid);
session.save();
logger.debug("Finished ingest with pid: {}", pid);
return created(uriInfo.getAbsolutePath()).entity(pid).build();
return created(uriInfo.getRequestUri()).entity(pid).build();

} finally {
session.logout();
Expand Down

0 comments on commit c8cefbe

Please sign in to comment.