max-initial-line-length does not seem to work as expected

320 views
Skip to first unread message

David Hoffer

unread,
Dec 3, 2021, 2:35:43 PM12/3/21
to Quarkus Development mailing list

We were using a manually set value for quarkus.http.limits.max-initial-line-length of 4096

but we get 414 errors when the URL portion of this line is over about 2855 characters so the total length is under 2900.  Why does Quarkus think this is over 4096?

-Dave

David Hoffer

unread,
Dec 3, 2021, 7:22:34 PM12/3/21
to Quarkus Development mailing list
In my testing I have to set the property to at least 42% more than the number of characters.  So it's not counting chars or bytes.  What is it counting?

-Dave

--
You received this message because you are subscribed to a topic in the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/quarkus-dev/F_skqdi_RJ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/c153f898-86f8-4ced-838b-c840ca76da5bn%40googlegroups.com.

Georgios Andrianakis

unread,
Dec 5, 2021, 9:43:28 AM12/5/21
to David Hoffer, Quarkus Development mailing list
It's counting the total number of bytes of the first HTTP line (it ends up being used by io.netty.handler.codec.http.HttpObjectDecoder).
I tested it and it works as expected.

You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAA8BW8EbuMUo95Z2ZAqcR82BW9bo53gT1v3fWFDXJogbOoJkFw%40mail.gmail.com.

David Hoffer

unread,
Dec 5, 2021, 10:33:29 AM12/5/21
to Georgios Andrianakis, Quarkus Development mailing list
Hum, I didn't get that in my testing.  I had to use a value ~42% greater than the number of characters in line 1.  Line 1 is all ASCII so it seems it could be 1 byte per character but I had to set the max at about 1.42 times the number of characters.  My GET URI portion has a very long comma separated list of numbers in the query string.  I don't understand how they are counting bytes.

-Dave

Sergey Bezrukov

unread,
Dec 5, 2021, 12:04:14 PM12/5/21
to dhof...@gmail.com, Georgios Andrianakis, Quarkus Development mailing list
Each comma will be url-escaped so what it occupied 3 bytes (%2C afaik)

вс, 5 дек. 2021 г., 18:33 David Hoffer <dhof...@gmail.com>:

David Hoffer

unread,
Dec 5, 2021, 12:44:35 PM12/5/21
to Sergey Bezrukov, Georgios Andrianakis, Quarkus Development mailing list
Ah, I forgot that comma would be escaped, got it.

-Dave
Reply all
Reply to author
Forward
0 new messages