Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public class ObjectEndpoint extends EndpointBase {
private static final Logger LOG =
LoggerFactory.getLogger(ObjectEndpoint.class);

private static String delimiter = "/";

@Context
private HttpHeaders headers;

Expand Down Expand Up @@ -191,8 +193,12 @@ public Response put(
// Normal put object
OzoneBucket bucket = getBucket(bucketName);

output = bucket.createKey(keyPath, length, replicationType,
replicationFactor, new HashMap<>());
if (keyPath.endsWith(delimiter)) {
bucket.createDirectory(keyPath);
} else {
output = bucket.createKey(keyPath, length, replicationType,
replicationFactor, new HashMap<>());
}

if ("STREAMING-AWS4-HMAC-SHA256-PAYLOAD"
.equals(headers.getHeaderString("x-amz-content-sha256"))) {
Expand Down