1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.urllib: keep the query parameter order (#13405)

This commit is contained in:
Vincenzo Palazzo
2022-02-09 16:36:12 +01:00
committed by GitHub
parent 4be3c92640
commit 0d1d259bb4
5 changed files with 134 additions and 49 deletions

View File

@ -230,6 +230,11 @@ fn parse_request_line(s string) ?(Method, urllib.URL, Version) {
}
// Parse URL encoded key=value&key=value forms
//
// FIXME: Some servers can require the
// parameter in a specific order.
//
// a possible solution is to use the a list of QueryValue
pub fn parse_form(body string) map[string]string {
words := body.split('&')
mut form := map[string]string{}