Skip to content

Commit

Permalink
make sure the node exists before going into our streaming output.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed May 9, 2013
1 parent 7571ff0 commit 0c0e0e6
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1,7 +1,6 @@

package org.fcrepo.api;

import static javax.ws.rs.core.MediaType.*;
import static javax.ws.rs.core.Response.created;
import static javax.ws.rs.core.Response.noContent;
import static org.fcrepo.http.RDFMediaType.*;
Expand Down Expand Up @@ -120,6 +119,13 @@ public StreamingOutput describeRdf(@PathParam("path") final List<PathSegment> pa

Variant bestPossibleResponse = request.selectVariant(POSSIBLE_RDF_VARIANTS);

final Session session = getAuthenticatedSession();
try {
session.getNode(path);
} finally {
session.logout();
}

return new GraphStreamingOutput(
getAuthenticatedSessionProvider(),
objectService,
Expand Down

0 comments on commit 0c0e0e6

Please sign in to comment.