Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Fixed on reading un-encoded copy-source header field #567

Open
wants to merge 1 commit into
base: legacy-master
Choose a base branch
from
Open
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 @@ -59,7 +59,7 @@ public static String getAcl(final HttpURLConnection request) {
* @throws URISyntaxException
*/
public static BlobAttributes getBlobAttributes(final HttpURLConnection request, final StorageUri resourceURI,
final String snapshotID) throws URISyntaxException, ParseException {
final String snapshotID) throws URISyntaxException, ParseException, StorageException {

final String blobType = request.getHeaderField(BlobConstants.BLOB_TYPE_HEADER);
final BlobAttributes attributes = new BlobAttributes(BlobType.parse(blobType));
Expand Down Expand Up @@ -268,7 +268,7 @@ public static AccountInformation getAccountInformation(final HttpURLConnection r
* @throws URISyntaxException
* @throws ParseException
*/
public static CopyState getCopyState(final HttpURLConnection request) throws URISyntaxException, ParseException {
public static CopyState getCopyState(final HttpURLConnection request) throws URISyntaxException, ParseException, StorageException {
String copyStatusString = request.getHeaderField(Constants.HeaderConstants.COPY_STATUS);
if (!Utility.isNullOrEmpty(copyStatusString)) {
final CopyState copyState = new CopyState();
Expand All @@ -286,7 +286,7 @@ public static CopyState getCopyState(final HttpURLConnection request) throws URI

final String copySourceString = request.getHeaderField(Constants.HeaderConstants.COPY_SOURCE);
if (!Utility.isNullOrEmpty(copySourceString)) {
copyState.setSource(new URI(copySourceString));
copyState.setSource(new URI(Utility.safeEncode(copySourceString)));
}

final String copyCompletionTimeString =
Expand Down