mgomes/api_auth — pull request #2 by Umofomia (2012-03-08 04:27:21+00:00)
Title: Fix issue with ActionControllerRequest#request_uri not including the query string in the URI.

I ran into this issue while trying to get api-auth to work on Rails 2.3. This pull request fixes it.

**Issue:** `ActionControllerRequest#request_uri` was using `ActionController::Request#path` instead of `#request_uri`, which does not include the query string in the URI. Because of this, `Headers#canonical_string` will end up being incorrect, causing authentication to fail.

**Fix:** I fixed `ActionControllerRequest#request_uri` to call `#request_uri` instead of `#path`. I also added RSpec tests to confirm its functionality. The canonical string test, in particular, will fail without the fix.

**Remarks:** I noticed @alexmchale actually [made this change](https://github.com/mgomes/api_auth/commit/d2e25702161b64cd97cc70ae7b1faecf3b7200d1#diff-0) when trying to get api-auth to work on Rails 3, but then [pulled it back out](https://github.com/mgomes/api_auth/commit/a4054d45cf636e2813999b659c80484da962a840#diff-2) in his final fix. Because of this, the issue was only addressed for Rails 3; requests still ended up failing when both client and server are running Rails 2.3.

**Special Request:** Once this pull request is approved, would you mind publishing a new version of your gem with this fix in it so that I can deploy it on my project? I would greatly appreciate it.

Thanks!