From da10de630973193bc55bf9aaaf7e136277611e45 Mon Sep 17 00:00:00 2001 From: vibr Date: Tue, 5 Apr 2005 18:43:23 +0000 Subject: [PATCH] add function HTTP-URL-PATH->PATH-STRING (unparses path in http-url record into string) --- scheme/lib/url.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scheme/lib/url.scm b/scheme/lib/url.scm index c3c8328..f68f0d1 100644 --- a/scheme/lib/url.scm +++ b/scheme/lib/url.scm @@ -276,8 +276,14 @@ (string-append scheme-and-host-string port-string path-string query-string))) +;;; Unparse the http-url-path field of an http-url record into its corresponding part of the Request_URI - +(define (http-url-path->path-string http-url-path) + (fold-right + (lambda (segment res) + (string-append "/" (escape-segment segment) res)) + "" + http-url-path)) ;;; decoding and encoding Request-URIs: