if (checkPermission(resolved, connection.getContentType()) != true) {
throw new RestletException("Request for nonpermitted content type or hostname",
Status.CLIENT_ERROR_BAD_REQUEST);
}
response.setEntity(new StreamRepresentation(new MediaType(connection
.getContentType())) {
@Override
public void write(OutputStream out) throws IOException {
copyStream(connection.getInputStream(), out);
}