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

MAX_REQUEST_PATH_LENGTH = 1024; Why? #404

Closed
mdimas opened this issue Nov 4, 2013 · 8 comments
Closed

MAX_REQUEST_PATH_LENGTH = 1024; Why? #404

mdimas opened this issue Nov 4, 2013 · 8 comments

Comments

@mdimas
Copy link

mdimas commented Nov 4, 2013

Why is there a limit placed on the path length? Especially one that is considerably smaller than the one imposed by any browser. When working with paths that contain non-ascii characters that need to be encoded the length can frequently by longer than 1024 characters.

Is there a way to override this setting?

@evanphx
Copy link
Member

evanphx commented Nov 5, 2013

It's something that the parser inherited from mongrel, but we can certainly change it. What do you think a good value is?

@mdimas
Copy link
Author

mdimas commented Nov 5, 2013

Thanks for looking at this so quickly.

According to the RFC "The HTTP protocol does not place any a priori limit on the length of a URI." It appears that IE enforces the shortest maximum at 2083 bytes, with other browsers supporting much higher limits. It seems like at least allowing 2083 would be nice, or maybe not enforcing anything at all since it isn't defined in the standard.

@mdimas
Copy link
Author

mdimas commented Nov 7, 2013

@evanphx any estimate on when a release with the higher maximum will be available?

@priyankc
Copy link
Contributor

Made a fix to increase URI path length to 2048. Included tests to validate.

@ghost
Copy link

ghost commented Dec 6, 2013

@mdimas : #408 was merged to increase the max length to 2048 (as per HTTP RFC), so you can likely close this ticket now

@evanphx
Copy link
Member

evanphx commented Jan 26, 2014

This has been changed to 2048.

@evanphx evanphx closed this as completed Jan 26, 2014
@ryandotsmith
Copy link

Is it worth the effort of making this configurable via puma config? I am in a situation where I would like to have this value be much larger than 2048.

@ryandotsmith
Copy link

rfc2616 3.2.1

The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants