* removed introduced bug in ESCAPE-URI, happened by removing stringhax.scm
(string-reduce was not fold-right but fold-left)
This commit is contained in:
parent
09dfa74792
commit
87e3cb0c84
4
ftpd.scm
4
ftpd.scm
|
@ -16,7 +16,7 @@
|
|||
; - GET/RETR-command: ftpd reports "Can't open FILENAME for reading" if
|
||||
; file actually doesn't exist. This is confusing. Reporting
|
||||
; "FILENAME does not exist" is much better.
|
||||
|
||||
; - default value for ftpd should be looked up as in ftp.scm
|
||||
|
||||
(define *logfile* #f) ; file-port to log to like wu-ftpd (analyzable with webalizer)
|
||||
|
||||
|
@ -1218,7 +1218,7 @@
|
|||
|
||||
; Version
|
||||
|
||||
(define *ftpd-version* "$Revision: 1.37 $")
|
||||
(define *ftpd-version* "$Revision: 1.38 $")
|
||||
|
||||
(define (copy-port->port-binary input-port output-port)
|
||||
(let ((buffer (make-string *window-size*)))
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
|
||||
(define (escape-html s)
|
||||
(let ((target-length
|
||||
(string-fold-right (lambda (c i)
|
||||
(string-fold (lambda (c i)
|
||||
(+ i
|
||||
(if (char-set-contains? *html-entities* c)
|
||||
(string-length
|
||||
|
@ -175,7 +175,7 @@
|
|||
(if (= target-length (string-length s))
|
||||
s
|
||||
(let ((target (make-string target-length)))
|
||||
(string-fold-right
|
||||
(string-fold
|
||||
(lambda (c i)
|
||||
(+ i
|
||||
(if (char-set-contains? *html-entities* c)
|
||||
|
|
4
uri.scm
4
uri.scm
|
@ -161,7 +161,7 @@
|
|||
|
||||
(define (escape-uri s . maybe-escaped-chars)
|
||||
(let-optionals maybe-escaped-chars ((escaped-chars uri-escaped-chars))
|
||||
(let ((nlen (string-fold-right
|
||||
(let ((nlen (string-fold
|
||||
(lambda (c i)
|
||||
(+ i
|
||||
(if (char-set-contains? escaped-chars c)
|
||||
|
@ -170,7 +170,7 @@
|
|||
s))) ; new length of escaped string
|
||||
(if (= nlen (string-length s)) s
|
||||
(let ((ns (make-string nlen)))
|
||||
(string-fold-left
|
||||
(string-fold
|
||||
(lambda (c i) ; replace each occurance of an
|
||||
; character to escape with %ff where ff
|
||||
; is the ascii-code in hexadecimal
|
||||
|
|
Loading…
Reference in New Issue