Description: Fix incorrect contents in the first upstream tarball
Author: Federico Ceratto <federico@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/lib/pure/uri.nim
+++ b/lib/pure/uri.nim
@@ -9,7 +9,7 @@
 
 ## This module implements URI parsing as specified by RFC 3986.
 
-import strutils, parseutils, tables
+import strutils, parseutils
 type
   Url* = distinct string
 
@@ -368,40 +368,6 @@
     result.add("#")
     result.add(u.anchor)
 
-type
-  Query* = distinct Table[string, seq[string]]
-  QueryValues* = distinct seq[string]
-
-proc `[]`*(query: Query, key: string): QueryValues =
-  return Table[string, seq[string]](query)[key].QueryValues
-
-proc `[]`*(query: Query, key: string, i: int): string =
-  return Table[string, seq[string]](query)[key][0]
-
-converter toString*(value: QueryValues): string =
-  return seq[string](value)[0]
-
-proc parseQuery*(query: string): Query =
-  var res = initTable[string, seq[string]]()
-  var i = 0
-
-  while query[i] != '\0':
-    var key = ""
-    var value = ""
-    i = query.parseUntil(key, {'=', '\0'}, i)
-    assert query[i] == '='
-    i.inc() # Skip =
-
-    i = query.parseUntil(value, {'&', '\0'}, i)
-    if query[i] == '&': i.inc()
-
-    if key in res:
-      res[key].add(value)
-    else:
-      res[key] = @[value]
-
-  return res.Query
-
 when isMainModule:
   block:
     const test1 = "abc\L+def xyz"
@@ -647,10 +613,4 @@
     doAssert "https://example.com/about/staff.html?".parseUri().isAbsolute == true
     doAssert "https://example.com/about/staff.html?parameters".parseUri().isAbsolute == true
 
-  block: # parseQuery
-    doAssert "foo=bar".parseQuery()["foo"] == "bar"
-    doAssert "foo=bar&alpha=beta".parseQuery()["foo"] == "bar"
-    doAssert "foo=bar&alpha=beta".parseQuery()["alpha"] == "beta"
-    doAssert "foo=&alpha=beta".parseQuery()["foo"] == ""
-
   echo("All good!")
