Skip to content
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

s3 urls get an additional "." appended to their url #36

Closed
tbhockey opened this issue Sep 21, 2012 · 2 comments
Closed

s3 urls get an additional "." appended to their url #36

tbhockey opened this issue Sep 21, 2012 · 2 comments

Comments

@tbhockey
Copy link

In my email layout I have a very simple image tag which points to amazon s3.

<img src="http://s3.amazonaws.com/bucket/image.jpg">

When roadie is install this url gets converted to this:

<img src="http://s3.amazonaws..com/bucket/image.jpg">

[Note the additional "." before com]

@Mange
Copy link
Owner

Mange commented Sep 24, 2012

I cannot replicate this.

rendering('<img src="http://s3.amazonaws.com/bucket/image.jpg">').should have_attribute('src' => 'http://s3.amazonaws.com/bucket/image.jpg')

This test passes. The implementation is also using the built-in URI class to check that the URL is relative, and it should not be relative.

# Other details removed
uri = URI.parse(url)
if uri.relative? # should be false
  make_uri_absolute
else
  uri.to_s # should work
end

So unless URI is buggy in your Ruby (and either returns true on relative? or generates an incorrect URL with to_s), the fault lies somewhere else.

Which version of Ruby are you using? Does it happen for any http://s3.amazonaws.com URL? Is there some funky characters in the true URL?

@Mange
Copy link
Owner

Mange commented Oct 22, 2012

Closing this due to inactivity.

@Mange Mange closed this as completed Oct 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants