Commit Graph

6 Commits

Author SHA1 Message Date
Timothee Cour
0fcf1af765 uri: document removeDotSegments, add tests, show failure modes (#17064)
* uri: document removeDotSegments, add tests, show failure modes
* address comments
2021-02-20 17:58:54 +01:00
Benoit Favre
81703d4ad4 Fix bug in removeDotSegments: added test (#17050)
* Fix bug in removeDotSegments when path ends with dot

* Add test for trailing period bug in uri
2021-02-16 20:20:37 +01:00
Mildred Ki'Lya
71db2be833 Improve uri.parseQuery to never raise an error (#16647)
In case of malformed query string where there is `=` on the value, handle
this character as part of the value instead of throwing an error.

The following query string should no longer crash a program:

    key=value&key2=x=1

It will be interpreted as [("key", "value"), ("key2", "x=1")]

This is correct according to latest WhatWG's HTML5 specification
recarding the urlencoded parser:
https://url.spec.whatwg.org/#concept-urlencoded-parser

Older behavior can be restored using the -d:nimLegacyParseQueryStrict
flag.
2021-01-12 13:42:05 +01:00
Timothee Cour
fc1a4faf56 improve turi.nim tests: js, vm; merge tdecodequery.nim (#16500)
* improve turi tests: js, vm; merge tdecodequery.nim

* improve test

* add test in js, improve test

* remove   matrix: "--styleCheck:hint --panics:on"

* fixup
2020-12-29 13:26:10 +01:00
flywind
cbc793b30b move tests to testament (#16101)
* move tests to testament

* minor

* fix random

* disable test random
2020-11-24 19:06:41 +01:00
flywind
e85c5ad379 fix #15333 (#15336) 2020-09-24 08:54:13 +02:00