httpserver: missing query string in request info#859
Conversation
|
Nice one, thank you! Did you check if hash parameters are copied correctly? |
The hash part don't sent to server, we don't need to handle it. |
|
And I think an error should be thrown when the pathname or query or something is too long, the current behavior is just ignoring the over-limit part, in some edge cases, this may cause some confusion. |
|
We could compute the necessary length and always dynamically allocate it? |
That will cause some security problems, attacker can send a large payload to comsume all memory on server. Usually, 2048 bytes header should enough for most case, the problem is url being truncated without any notice. |
|
Fair enough. That's what we have right now though, which I guess it's reasonable. Let's fix it if / when we run into real world problems? |
That's ok. |
lws_http_get_uri_and_methoddoes not include the query string of request, we need uselws_hdr_copy(wsi, bufsize, WSI_TOKEN_HTTP_URI_ARGS)to get the query string.