-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Deprecate url path cleaning during http request serialization #4832
Changes from 9 commits
c1308d6
d107311
afc6b87
6e99df2
e8df529
966f546
970e5a0
16b4c86
30b3388
ceeb008
2168800
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,19 +252,8 @@ type Config struct { | |
// and specify a Retryer instead. | ||
SleepDelay func(time.Duration) | ||
|
||
// DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests. | ||
// Will default to false. This would only be used for empty directory names in s3 requests. | ||
// | ||
// Example: | ||
// sess := session.Must(session.NewSession(&aws.Config{ | ||
// DisableRestProtocolURICleaning: aws.Bool(true), | ||
// })) | ||
// | ||
// svc := s3.New(sess) | ||
// out, err := svc.GetObject(&s3.GetObjectInput { | ||
// Bucket: aws.String("bucketname"), | ||
// Key: aws.String("//foo//bar//moo"), | ||
// }) | ||
// Deprecated: This setting no longer has any effect. | ||
// RESTful paths are no longer cleaned after request serialization. | ||
DisableRestProtocolURICleaning *bool | ||
|
||
// EnableEndpointDiscovery will allow for endpoint discovery on operations that | ||
|
@@ -497,13 +486,6 @@ func (c *Config) WithLowerCaseHeaderMaps(t bool) *Config { | |
return c | ||
} | ||
|
||
// WithDisableRestProtocolURICleaning sets a config DisableRestProtocolURICleaning value | ||
// returning a Config pointer for chaining. | ||
func (c *Config) WithDisableRestProtocolURICleaning(t bool) *Config { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't remove this (breaking change). Do please add the same deprecation message as we did on the field itself, though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha, just over-understand deprecate |
||
c.DisableRestProtocolURICleaning = &t | ||
return c | ||
} | ||
|
||
// MergeIn merges the passed in configs into the existing config object. | ||
func (c *Config) MergeIn(cfgs ...*Config) { | ||
for _, other := range cfgs { | ||
|
@@ -608,10 +590,6 @@ func mergeInConfig(dst *Config, other *Config) { | |
dst.SleepDelay = other.SleepDelay | ||
} | ||
|
||
if other.DisableRestProtocolURICleaning != nil { | ||
dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning | ||
} | ||
|
||
if other.EnforceShouldRetryCheck != nil { | ||
dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two spaces here to indent instead of 4. IIRC the code that handles this is incredibly picky, best to be safe.