Skip to content

Commit a1d2f23

Browse files
committed
url: fix query param separators in url/literal->string
1 parent 7b769fc commit a1d2f23

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

http-easy-lib/http-easy/private/url.rkt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@
108108
(loop (cdr path-components)))))
109109
(unless (null? query)
110110
(write-char #\? out)
111-
(for ([pair (in-list query)])
111+
(for ([(pair idx) (in-indexed (in-list query))])
112+
(unless (zero? idx)
113+
(write-char #\& out))
112114
(match-define (cons (app symbol->string name) value) pair)
113115
(write-string (maybe-percent-encode name form-urlencoded-encode) out)
114116
(when value

http-easy-lib/info.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#lang info
22

33
(define license 'BSD-3-Clause)
4-
(define version "0.8")
4+
(define version "0.8.1")
55
(define collection "net")
66
(define deps
77
'(["base" #:version "8.1.0.4"]

http-easy-test/net/http-easy/private/url.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
("http://example.com/a/b/c" . "http://example.com/a/b/c")
6767
("http://example.com/a%2Bb.mp3" . "http://example.com/a%2Bb.mp3")
6868
("http://example.com/a%2Bb.mp3?c=d+e" . "http://example.com/a%2Bb.mp3?c=d%2Be")
69+
("http://example.com/a%2Bb.mp3?c=d+e&f&g=h" . "http://example.com/a%2Bb.mp3?c=d%2Be&f&g=h")
6970
("a/b/c" . "a/b/c")
7071
("/a/b/c" . "/a/b/c")
7172
("/a;b;c" . "/a;b;c")))

0 commit comments

Comments
 (0)