You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for continuing to maintain the source code forked from Upplication/Amazon-S3-FileSystem-NIO2. Your efforts are greatly appreciated.
Bug Description
The "s3fs.protocol" environment variable applies to both the S3 client and the Proxy. Therefore, if the S3 client uses HTTPS and the Proxy uses HTTP, they must use unified protocol. This behavior can be problematic in environments where it is not possible to change the Proxy settings.
Expected Behavior
I would like to separate the configuration of S3 and Proxy protocols.
Environment
s3fs-nio version:1.0.1
OS: not relevant
JDK: not relevant
A patch for my environment.
Below is the patch I created for my development environment. Although it is a tricky modification, I only changed the S3Factory.class, which has a clear scope of effect. If the changes below are OK, I would like to create a pull request.
// In org.carlspring.cloud.storage.s3fs.S3Factory.javapublicstaticfinalStringPROXY_PROTOCOL = "s3fs.proxy.protocol"; // add a new constantprotectedProxyConfigurationgetProxyConfiguration(finalPropertiesprops)
{
finalProxyConfiguration.Builderbuilder = ProxyConfiguration.builder();
if (props.getProperty(PROXY_HOST) != null)
{
finalStringhost = props.getProperty(PROXY_HOST);
finalStringportStr = props.getProperty(PROXY_PORT);
intport = -1;
try
{
port = portStr != null ? Integer.parseInt(portStr, RADIX) : -1;
}
catch (finalNumberFormatExceptione)
{
printWarningMessage(props, PROXY_PORT);
}
// modification start// Calls the getEndpointUri method after setting the PROTOCOL property to the value of PROXY_PROTOCOL.finalPropertiespropsCopy = newProperties();
for (Stringkey : props.stringPropertyNames()) {
propsCopy.setProperty(key, props.getProperty(key));
}
if (propsCopy.getProperty(PROXY_PROTOCOL) != null)
{
propsCopy.setProperty(PROTOCOL, props.getProperty(PROXY_PROTOCOL));
}
finalURIuri = getEndpointUri(host, port, propsCopy);
// modification endbuilder.endpoint(uri);
}
The text was updated successfully, but these errors were encountered:
Thank you for your kind words and for reporting this!
Would you like to open a pull request for it? We can then review it and have a closer look. When you make the fork, could you please make sure that we have committer rights to your fork as well? Thanks!
Thank you for continuing to maintain the source code forked from Upplication/Amazon-S3-FileSystem-NIO2. Your efforts are greatly appreciated.
Bug Description
The "s3fs.protocol" environment variable applies to both the S3 client and the Proxy. Therefore, if the S3 client uses HTTPS and the Proxy uses HTTP, they must use unified protocol. This behavior can be problematic in environments where it is not possible to change the Proxy settings.
Expected Behavior
I would like to separate the configuration of S3 and Proxy protocols.
Environment
s3fs-nio
version:1.0.1A patch for my environment.
Below is the patch I created for my development environment. Although it is a tricky modification, I only changed the S3Factory.class, which has a clear scope of effect. If the changes below are OK, I would like to create a pull request.
The text was updated successfully, but these errors were encountered: