Fix for potential issue where application is using both aws-s3 and right_http_connection #7

wants to merge 1 commit into


None yet
6 participants

gammons commented Aug 3, 2011

Sometimes applications are using both right_aws AND aws-s3. This is notably true with the paper_clip gem, which is relying on aws-s3.

Both right_http_connection and aws-s3 do a few tricks with Net::HTTP. My patch will rescue an error where send_request_with_body_stream is potentially redefined by aws-s3. Their version only takes 4 arguments, as opposed to your 5.


ghost commented Sep 2, 2011


A better solution probably would be to omit send_only argument if it is equal to the default. This assumes that the patches can in fact be applied in either order, which is not necessarily the case:, search for "‘incompatible Net::HTTP monkey-patch‘ ".

benr75 commented Nov 6, 2011


I think this issue and #4 are fixable by adding a new method with 5 arguments instead of the current approach of changing the signature of an existing method to take 5 arguments instead of 4. Reading right_aws, aws-s3 and rest-client source it seems to me that all three could coexist if right_aws patched Net::HTTP more carefully.

gammons commented Nov 30, 2011

Oh, I had no idea that send_request_with_body_stream was a private method in Net::HTTP! Why would right_aws chagne its method signature? That seems bad! Very bad! No wonder things are breaking.

right_aws definitely needs an update. My pull request is simply a band-aid. right_aws should not be redefining method signatures of core ruby libraries.

Furthermore this pull request has been opened for months. I get the hint that this gem is no longer supported. Is it being supported elsewhere?

When I said "right_aws" I meant of course right_http_connection, which is this project. right_aws uses right_http_connection to talk to aws.

right_aws (I mean it this time) does seem to be receiving more maintainer love than right_http_connection.

gammons commented Nov 30, 2011

ditto. I meant right_http_connection as well.

I intend to take a stab at rewriting Net::HTTP patches by right_http_connection to be less intrusive, no promises on when this happens though.


pashamur commented Dec 9, 2013

Is there any update on this issue - it's been two years since the last comment. I'm trying to update a relatively old paperclip installation to a newer version and I ran into this issue. Solved temporarily by removing right_http_connection & right_aws altogether, but it would be nice if these gems could play nicely together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment