aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch/fetch.3
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2000-05-11 13:31:02 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2000-05-11 13:31:02 +0000
commit60245e42b0f8eae5d3eac87f1c204ae510b8c547 (patch)
tree84787caa5073f7eb2b15de471a26c816cfab30eb /lib/libfetch/fetch.3
parentd1c418891e13501140f16d02a3e4c6c3c9c62c88 (diff)
downloadsrc-60245e42b0f8eae5d3eac87f1c204ae510b8c547.tar.gz
src-60245e42b0f8eae5d3eac87f1c204ae510b8c547.zip
Reorganize some of the http code and split it into more functions.
Implement fetchStatHTTP(). Unbungle struct url, and add fetchFreeURL(). Document it.
Notes
Notes: svn path=/head/; revision=60376
Diffstat (limited to 'lib/libfetch/fetch.3')
-rw-r--r--lib/libfetch/fetch.348
1 files changed, 25 insertions, 23 deletions
diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3
index 28bdb3336d6d..e99fdb98a792 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 <sys/param.h>
.Fd #include <stdio.h>
.Fd #include <fetch.h>
+.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
+ <scheme>:(//(<user>(:<pwd>)?@)?<host>(:<port>)?)?/(<document>)?
+.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 <scheme>
+and <document> 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
- <scheme>:(//(<user>(:<pwd>)?@)?<host>(:<port>)?)?/(<document>)?
-.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 <scheme>
-and <document> 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.