txaws icon indicating copy to clipboard operation
txaws copied to clipboard

Deprecate _CanonicalRequest.from_request_component in favour of something better

Open mithrandi opened this issue 8 years ago • 3 comments

This API takes a "sort of decoded" path where the path must be joined on slashes, but the components must not be urlencoded. This generally encourages doing bad things, so we should replace it with something better (eg. a list of decoded path components).

mithrandi avatar May 13 '17 09:05 mithrandi

Is it worth bringing up hyperlink.URL / twisted.python.url.URL again?

Julian avatar May 13 '17 14:05 Julian

I'm not really actually that familiar with the V4 auth code, maybe @markrwilliams can comment on whether a URL is a suitable structure for passing to the auth code. (At least I think it was him having Opinions™ about the test suite; my apologies if I'm mis-attributing again). However, I believe twisted.python.url.URL (and thus I assume hyperlink.URL) is unable to cope with non-value query strings (eg. https://s3.amazonaws.com/bucket/object?acl) so that would need to be fixed first.

mithrandi avatar May 13 '17 17:05 mithrandi

@mithrandi It was indeed me! I'd like to push URL construction as far down the call tree as possible, so I think we need some kind of class if not hyperlink.URL.

However, It turns out that hyperlink.url.URL.set allows valueless parameters

markrwilliams avatar May 13 '17 17:05 markrwilliams