@@ 163-179 (lines=17) @@ | ||
160 | return "{$command['Bucket']}.{$host}"; |
|
161 | } |
|
162 | ||
163 | private function applyHostStyleEndpoint( |
|
164 | CommandInterface $command, |
|
165 | RequestInterface $request |
|
166 | ) { |
|
167 | $uri = $request->getUri(); |
|
168 | $request = $request->withUri( |
|
169 | $uri->withHost($this->getBucketStyleHost( |
|
170 | $command, |
|
171 | $uri->getHost() |
|
172 | )) |
|
173 | ->withPath($this->getBucketlessPath( |
|
174 | $uri->getPath(), |
|
175 | $command |
|
176 | )) |
|
177 | ); |
|
178 | return $request; |
|
179 | } |
|
180 | ||
181 | private function applyDualStackEndpoint( |
|
182 | CommandInterface $command, |
|
@@ 203-217 (lines=15) @@ | ||
200 | return "s3.dualstack.{$this->region}.amazonaws.com"; |
|
201 | } |
|
202 | ||
203 | private function applyAccelerateEndpoint( |
|
204 | CommandInterface $command, |
|
205 | RequestInterface $request, |
|
206 | $pattern |
|
207 | ) { |
|
208 | $request = $request->withUri( |
|
209 | $request->getUri() |
|
210 | ->withHost($this->getAccelerateHost($command, $pattern)) |
|
211 | ->withPath($this->getBucketlessPath( |
|
212 | $request->getUri()->getPath(), |
|
213 | $command |
|
214 | )) |
|
215 | ); |
|
216 | return $request; |
|
217 | } |
|
218 | ||
219 | private function getAccelerateHost(CommandInterface $command, $pattern) |
|
220 | { |