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

allow longer http methods for service-specific custom methods #12311

Closed
wants to merge 1 commit into from

Conversation

gfx
Copy link
Contributor

@gfx gfx commented Nov 13, 2023

Hi, team! Looks like #10720 has accidentally added a new limitation to the length of HTTP methods to 11, which affects our internal use of curl(1).

This PR doubles the limitation, which is large enough for our usage. Can you take a look at it?

  • Checked whether it works for our usage

@github-actions github-actions bot added the HTTP label Nov 13, 2023
@jay
Copy link
Member

jay commented Nov 13, 2023

I think this a good idea. The longest registered method UPDATEREDIRECTREF is 17 characters long. By custom methods do you mean methods not registered?

@gfx
Copy link
Contributor Author

gfx commented Nov 13, 2023

@jay

Thank you for the additional motivation to change the current limitation!

Our custom methods won't be registered because they are used only in our internal services. The max length of our methods is 18 bytes, so I think 23 is large enough for those who use custom, unregistered methods.

@jay jay closed this in 26e5424 Nov 13, 2023
@jay
Copy link
Member

jay commented Nov 13, 2023

Thanks

zuoxiaofeng pushed a commit to zuoxiaofeng/curl that referenced this pull request Nov 28, 2023
- Increase the maximum request method name length from 11 to 23.

For HTTP/1.1 and earlier there's not a specific limit in libcurl for
method length except that it is limited by the initial HTTP request
limit (DYN_HTTP_REQUEST). Prior to fc2f1e5 HTTP/2 was treated the same
and there was no specific limit.

According to Internet Assigned Numbers Authority (IANA) the longest
registered method is UPDATEREDIRECTREF which is 17 characters.

Also there are unregistered methods used by some companies that are
longer than 11 characters.

The limit was originally added by 61f52a9 but not used until fc2f1e5.

Ref: https://www.iana.org/assignments/http-methods/http-methods.xhtml

Closes curl#12311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants