[fixes to uri parsing atsmyles@earthlink.net**20100420021517 Ignore-this: 5c06f95c4930d8c08c1301bac11ade6 ] hunk ./uri.scm 16 - (let ((constructor (rtd-constructor $uri))) - (lambda (scheme body query fragment) + (let* ((constructor (rtd-constructor $uri)) + (econstructor (lambda (scheme body query fragment) hunk ./uri.scm 24 + (lambda (scheme body . rest) + (cond + ((null? rest) (econstructor scheme body #f #f)) + ((and (pair? rest) (null? (cdr rest))) (econstructor scheme body (car rest) #f)) + ((and (pair? rest) (pair? (cdr rest)) (null? (cddr rest))) (econstructor scheme body (car rest) (cadr rest))) + (else (assertion-violation 'make-uri "this function only accepts 4 arguments")))))) hunk ./uri.scm 40 - (scheme (and (car indexes) (string->symbol (substring uri-string 0 (car indexes))))) + (scheme (and (car indexes) (substring uri-string 0 (car indexes)))) + (scheme? (and scheme (or (not (index-of scheme #\/)) #f))) ; check that the scheme only has alpha+digit+-._ hunk ./uri.scm 45 - (make-uri scheme body query fragment))) + (make-uri (and scheme? (string->symbol scheme)) + (cond + (scheme? body) + ((not scheme) body) + (else (string-append scheme ":" body))) + query fragment)))