Hi!

I have fixed the code which prevented Spiffy from serving files with a
``+'' in their filename:

--- http-utils.scm.orig 2006-02-06 15:20:14.000000000 +0100
+++ http-utils.scm      2006-02-06 13:55:02.000000000 +0100
@@ -108,8 +108,16 @@
       (parse-encoded-arguments args) ) ] 
     [else (values (http:canonicalize-string url) '())] ) )
 
+(define (separate-fields str)
+  (let ((str-list (string-split str "?" #t)))
+    (string-intersperse (cons (car str-list)
+                             (map (lambda (s) (string-translate s "+" " "))
+                                  (cdr str-list)))
+                       "?")))
+
+
 (define (http:canonicalize-string str)
-  (let loop ([i 0] [str (string-translate str "+" " ")])
+  (let loop ([i 0] [str (separate-fields str)])
     (match (string-search-positions "%[0-9ABCDEFabcdef]{2}" str i)
       [((i1 i2))
        (loop 

Groetjes,
Peter.


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to