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

Request-URI Too Large error with OpenID #43

Closed
ryanb opened this Issue Oct 11, 2010 · 6 comments

Comments

Projects
None yet
4 participants
@ryanb

ryanb commented Oct 11, 2010

Using Omniauth 0.1.2 with Ruby 1.9.2 and Rails 3, when I access /auth/open_id and include "http://" as part of my open id identifier (like "http://ryanbates.myopenid.com"), WEBrick will raise a WEBrick::HTTPStatus::RequestURITooLarge error. The URL includes /auth/open_id/callback with many parameters.

I don't know if this is just a limitation of WEBrick, but it would be nice if this gem generated shorter urls so this wasn't a problem.

@ryanb

This comment has been minimized.

Show comment
Hide comment
@ryanb

ryanb Oct 11, 2010

Actually, it sometimes happens without the "http" portion in the identifier, so I don't think that is a factor. It seems to work with Mongrel so maybe this is specific to WEBrick.

ryanb commented Oct 11, 2010

Actually, it sometimes happens without the "http" portion in the identifier, so I don't think that is a factor. It seems to work with Mongrel so maybe this is specific to WEBrick.

@mbleigh

This comment has been minimized.

Show comment
Hide comment
@mbleigh

mbleigh Oct 11, 2010

Contributor

I can't seem to replicate this with Webrick 1.3.1 and my own MyOpenID URL. The URL used in this case isn't really the choice of OmniAuth but is rather part of the OpenID standard (you may want to doublecheck me on this, I relied on Rack::OpenID to perform the OpenID portion of OmniAuth so maybe there's some way to do it). Since it only seems to affect WEBrick I'm going to go ahead and close this one.

Contributor

mbleigh commented Oct 11, 2010

I can't seem to replicate this with Webrick 1.3.1 and my own MyOpenID URL. The URL used in this case isn't really the choice of OmniAuth but is rather part of the OpenID standard (you may want to doublecheck me on this, I relied on Rack::OpenID to perform the OpenID portion of OmniAuth so maybe there's some way to do it). Since it only seems to affect WEBrick I'm going to go ahead and close this one.

@cbrulak

This comment has been minimized.

Show comment
Hide comment
@cbrulak

cbrulak Oct 16, 2010

when I use the my yahoo account for open id to sign in, I get the same error.

cbrulak commented Oct 16, 2010

when I use the my yahoo account for open id to sign in, I get the same error.

@ryanb

This comment has been minimized.

Show comment
Hide comment
@ryanb

ryanb Oct 20, 2010

@cbrulak, I think this is more-so a problem with WEBrick than Omniauth. The solution is to just use Mongrel.

gem 'mongrel', '1.2.0.pre2', :group => :development

ryanb commented Oct 20, 2010

@cbrulak, I think this is more-so a problem with WEBrick than Omniauth. The solution is to just use Mongrel.

gem 'mongrel', '1.2.0.pre2', :group => :development
@cbrulak

This comment has been minimized.

Show comment
Hide comment
@cbrulak

cbrulak Oct 20, 2010

Thin worked for me too. Thanks.

cbrulak commented Oct 20, 2010

Thin worked for me too. Thanks.

@huenerbruehe

This comment has been minimized.

Show comment
Hide comment
@huenerbruehe

huenerbruehe Jan 19, 2011

I had the same Problem with different openID Providers. It seems as if webrick does limit its max length of the uri by default. You can however change the maximum length in the file:

 ruby-directory/lib/ruby//webrick/httprequest.rb 

just look for the Errorline: RequestURITooLarge

right above you can change the max length. It should be around Line 246, depending on the Version of Webrick. I set the length to 2048 and never had this Problem since.

I had the same Problem with different openID Providers. It seems as if webrick does limit its max length of the uri by default. You can however change the maximum length in the file:

 ruby-directory/lib/ruby//webrick/httprequest.rb 

just look for the Errorline: RequestURITooLarge

right above you can change the max length. It should be around Line 246, depending on the Version of Webrick. I set the length to 2048 and never had this Problem since.

This issue was closed.

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