From 1b243ce46bf888f87d913d162b651abe44ef4b1b Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 27 Mar 2012 12:09:16 -0500 Subject: [PATCH] apply Andy's diff (and adjust the documentation correspondingly) closes PR 12652 original commit: fdf3fa6492837141a3d793b68f7bed25cedbfe80 --- collects/net/scribblings/url.scrbl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/collects/net/scribblings/url.scrbl b/collects/net/scribblings/url.scrbl index fb6671265a..2d04a7dc43 100644 --- a/collects/net/scribblings/url.scrbl +++ b/collects/net/scribblings/url.scrbl @@ -1,5 +1,6 @@ #lang scribble/doc @(require "common.rkt" scribble/bnf + (only-in net/url url-regexp) (for-label net/url net/url-unit net/url-sig net/head net/uri-codec net/tcp-sig (only-in net/url-connect current-https-protocol) @@ -95,7 +96,7 @@ An HTTP connection is created as a @deftech{pure port} or a have been removed, so that what remains is purely the first content fragment. An impure port is one that still has its MIME headers. -@defproc[(string->url [str string?]) url?]{ +@defproc[(string->url [str (and/c (or/c string? bytes?) url-regexp)]) url?]{ Parses the URL specified by @racket[str] into a @racket[url] struct. The @racket[string->url] procedure uses @@ -122,6 +123,16 @@ parsed as an absolute path, and the parsing details depend on ]} +@defthing[url-regexp regexp?]{ + +This is a regular expression based on the one in +Appendix B of RFC 3986 for recognizing urls. + +This is the precise regexp: + +@centered{@tt{@(object-name url-regexp)}} + +} @defproc[(combine-url/relative [base url?] [relative string?]) url?]{