On this page:
bytes-ci=?
url-replace-path
url-path->string
explode-path*
path-without-base
directory-part
build-path-unless-absolute
network-error
exn->string

5.9 Miscellaneous Utilities

 (require web-server/private/util)

procedure

(bytes-ci=? b1 b2)  boolean?

  b1 : bytes?
  b2 : bytes?
Compares two bytes case insensitively.

procedure

(url-replace-path proc u)  url?

  proc : ((listof path/param?) . -> . (listof path/param?))
  u : url?
Replaces the URL path of u with proc of the former path.

procedure

(url-path->string url-path)  string?

  url-path : (listof path/param?)
Formats url-path as a string with "/" as a delimiter and no params.

procedure

(explode-path* p)  (listof path-piece?)

  p : path-string?
Like normalize-path, but does not resolve symlinks.

procedure

(path-without-base base p)  (listof path-piece?)

  base : path-string?
  p : path-string?
Returns, as a list, the portion of p after base, assuming base is a prefix of p.

procedure

(directory-part p)  path?

  p : path-string?
Returns the directory part of p, returning (current-directory) if it is relative.

procedure

(build-path-unless-absolute base p)  path?

  base : path-string?
  p : path-string?
Prepends base to p, unless p is absolute.

procedure

(network-error s fmt v ...)  void

  s : symbol?
  fmt : string?
  v : any/c
Like error, but throws a exn:fail:network.

procedure

(exn->string exn)  string?

  exn : (or/c exn? any/c)
Formats exn with (error-display-handler) as a string.