[racket] type of path returned by url->path?

From: Matthew Butterick (mb at mbtype.com)
Date: Mon May 12 15:50:04 EDT 2014

I'm using the function below to extract a path from an HTTP request provided by the Racket webserver. What I notice is that on Windows, url->path returns a relative path, and on Unix/Mac, url->path returns a complete path. Why might this be so?


(require net/url web-server/http/request-structs)

(define (req->path req)
  (define p (url->path (request-uri req)))
  ; do things with p ...)







Posted on the users mailing list.