From a9ed660f51d2b2b40897b782d076227c7097ed87 Mon Sep 17 00:00:00 2001 From: des Date: Thu, 11 May 2000 13:31:02 +0000 Subject: Reorganize some of the http code and split it into more functions. Implement fetchStatHTTP(). Unbungle struct url, and add fetchFreeURL(). Document it. --- lib/libfetch/fetch.3 | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'lib/libfetch/fetch.3') diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3 index 28bdb33..e99fdb9 100644 --- a/lib/libfetch/fetch.3 +++ b/lib/libfetch/fetch.3 @@ -28,11 +28,12 @@ .Dt FETCH 3 .Os .Sh NAME +.Nm fetchParseURL , +.Nm fetchFreeURL , .Nm fetchGetURL , .Nm fetchPutURL , .Nm fetchStatURL , .Nm fetchListURL , -.Nm fetchParseURL , .Nm fetchGet , .Nm fetchPut , .Nm fetchStat , @@ -56,6 +57,10 @@ .Fd #include .Fd #include .Fd #include +.Ft struct url * +.Fn fetchParseURL "char *URL" +.Ft void +.Fn fetchFreeURL "struct url *URL" .Ft FILE * .Fn fetchGetURL "char *URL" "char *flags" .Ft FILE * @@ -64,8 +69,6 @@ .Fn fetchStatURL "char *URL" "struct url_stat *us" "char *flags" .Ft struct url_ent * .Fn fetchListURL "char *URL" "char *flags" -.Ft struct url * -.Fn fetchParseURL "char *URL" .Ft FILE * .Fn fetchGet "struct url *URL" "char *flags" .Ft FILE * @@ -103,6 +106,25 @@ These functions implement a high-level library for retrieving and uploading files using Uniform Resource Locators (URLs). .Pp +.Fn fetchParseURL +takes a URL in the form of a null-terminated string and splits it into +its components function according to the Common Internet Scheme Syntax +detailed in RFC1738. A regular expression which produces this syntax +is: +.Bd -literal + :(//((:)?@)?(:)?)?/()? +.Ed +.Pp +Note that some components of the URL are not necessarily relevant to +all URL schemes. +For instance, the file scheme only needs the +and components. +.Pp +The pointer returned by +.Fn fetchParseURL +should be freed using +.Fn fetchFreeURL . +.Pp .Fn fetchGetURL and .Fn fetchPutURL @@ -158,25 +180,6 @@ The pointer returned by should be freed using .Fn free . .Pp -.Fn fetchParseURL -takes a URL in the form of a null-terminated string and splits it into -its components function according to the Common Internet Scheme Syntax -detailed in RFC1738. A regular expression which produces this syntax -is: -.Bd -literal - :(//((:)?@)?(:)?)?/()? -.Ed -.Pp -Note that some components of the URL are not necessarily relevant to -all URL schemes. -For instance, the file scheme only needs the -and components. -.Pp -The pointer returned by -.Fn fetchParseURL -should be freed using -.Fn free . -.Pp .Fn fetchGet , .Fn fetchPut and @@ -414,7 +417,6 @@ Some parts of the library are not yet implemented. The most notable examples of this are .Fn fetchPutHTTP , -.Fn fetchStatHTTP , .Fn fetchListHTTP , .Fn fetchListFTP and FTP proxy support. -- cgit v1.1