Skip to content

axum::extract::Query cannot be processed normally when exceeding 150 characters ? #3420

Answered by mladedav
doveq asked this question in Q&A
Discussion options

You must be logged in to vote

There's no such limit as far as I know.
Sending this

curl -v 'localhost:4000/?q=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

to this handler

async fn handler(Query(s): Query<HashMap<String, String>>) {
    println!("{}", s.get("q").unwrap().len());
}

returns 200 and prints 200 (which is the number of xs in the query string.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jplatte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants