Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/fix s3 range reader read header error #301

Closed
Show file tree
Hide file tree
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 @@ -220,7 +220,7 @@ public URL getURL() throws MalformedURLException {
+ S3ConfigurationProperties.S3_DOT_VH
+ configProps.getRegion()
+ S3ConfigurationProperties.AMAZON_AWS
+ "/" + configProps.getFilename());
+ "/" + configProps.getKey());
}
return super.getURL();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ public void s3RangeGetURL() throws MalformedURLException {
//s3:// isn't recognized as a known protocol so a real URL can't be built on top of it.
//Let's check that we can get a valid URL anyway (translating it to http protocol).
URL url = reader.getURL();
BasicAuthURI uri = new BasicAuthURI(url);
S3ConfigurationProperties configurationProperties = new S3ConfigurationProperties(uri.getUri().getScheme(), uri);
assertEquals(region, configurationProperties.getRegion());
assertEquals(bucket, configurationProperties.getBucket());
assertEquals(file, configurationProperties.getKey());
}

@Test
Expand Down