(bytes []byte)
| 93 | } |
| 94 | |
| 95 | func parseFormBody(bytes []byte) []QueryItem { |
| 96 | str := string(bytes) |
| 97 | // Strip out any whitespace. Significant whitespace will be encoded, and so |
| 98 | // won't be stripped. |
| 99 | str = strings.Join(strings.Fields(str), "") |
| 100 | parsed := ParseRawQuery(str) |
| 101 | sort.SliceStable(parsed, func(i, j int) bool { |
| 102 | return parsed[i].Key < parsed[j].Key |
| 103 | }) |
| 104 | return parsed |
| 105 | } |
| 106 | |
| 107 | // AssertURLFormEqual compares two URLForm documents and identifies if the |
| 108 | // documents contain the same values. Emits a testing error, and returns false |
no test coverage detected