Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

Use port in request if specified. #189

Closed aslakhellesoy closed 11 years ago

aslakhellesoy commented 11 years ago

When using knox with an S3 emulator such as fakes3[1], the port is typically different from the default http/https ports (80/433).

This patch passes options.port to the http(s) options. Without this patch, the request will be issued to the default port (80/433) and result in an ECONNREFUSED error.

[1] https://github.com/jubos/fake-s3

aslakhellesoy commented 11 years ago

Apologies in advance for not creating a test for this - I thought it was simple enough that a test isn't needed.

aslakhellesoy commented 11 years ago

I can see that the port issue has been visited previously, especially in #169.

It could be that the requirement to set port in request options is relatively recent - I'm on node v0.10.13.

domenic commented 11 years ago

There was probably a regression. Will merge and add tests to prevent it from regressing again :).

domenic commented 11 years ago

Fixed as 9db8244d5332a9b5f34b879a6005735d03dd4d57.