2004-09-21 18:35:21 +00:00
|
|
|
|
.\"-
|
|
|
|
|
.\" Copyright (c) 1998-2004 Dag-Erling Co<43>dan Sm<53>rgrav
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.\" All rights reserved.
|
|
|
|
|
.\"
|
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
|
.\" are met:
|
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
|
.\"
|
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
|
.\" $FreeBSD$
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.\"
|
2008-12-15 08:27:44 +00:00
|
|
|
|
.Dd December 14, 2008
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Dt FETCH 3
|
|
|
|
|
.Os
|
|
|
|
|
.Sh NAME
|
2000-05-25 16:46:09 +00:00
|
|
|
|
.Nm fetchMakeURL ,
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.Nm fetchParseURL ,
|
|
|
|
|
.Nm fetchFreeURL ,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Nm fetchXGetURL ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Nm fetchGetURL ,
|
|
|
|
|
.Nm fetchPutURL ,
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Nm fetchStatURL ,
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Nm fetchListURL ,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Nm fetchXGet ,
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Nm fetchGet ,
|
|
|
|
|
.Nm fetchPut ,
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Nm fetchStat ,
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Nm fetchList ,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Nm fetchXGetFile ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Nm fetchGetFile ,
|
|
|
|
|
.Nm fetchPutFile ,
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Nm fetchStatFile ,
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Nm fetchListFile ,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Nm fetchXGetHTTP ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Nm fetchGetHTTP ,
|
|
|
|
|
.Nm fetchPutHTTP ,
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Nm fetchStatHTTP ,
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Nm fetchListHTTP ,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Nm fetchXGetFTP ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Nm fetchGetFTP ,
|
2000-04-22 16:08:41 +00:00
|
|
|
|
.Nm fetchPutFTP ,
|
|
|
|
|
.Nm fetchStatFTP ,
|
|
|
|
|
.Nm fetchListFTP
|
|
|
|
|
.Nd file transfer functions
|
|
|
|
|
.Sh LIBRARY
|
|
|
|
|
.Lb libfetch
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh SYNOPSIS
|
2001-10-01 16:09:29 +00:00
|
|
|
|
.In sys/param.h
|
|
|
|
|
.In stdio.h
|
|
|
|
|
.In fetch.h
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.Ft struct url *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchMakeURL "const char *scheme" "const char *host" "int port" "const char *doc" "const char *user" "const char *pwd"
|
2000-05-25 16:46:09 +00:00
|
|
|
|
.Ft struct url *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchParseURL "const char *URL"
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.Ft void
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchFreeURL "struct url *u"
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchXGetURL "const char *URL" "struct url_stat *us" "const char *flags"
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchGetURL "const char *URL" "const char *flags"
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchPutURL "const char *URL" "const char *flags"
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Ft int
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchStatURL "const char *URL" "struct url_stat *us" "const char *flags"
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Ft struct url_ent *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchListURL "const char *URL" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchXGet "struct url *u" "struct url_stat *us" "const char *flags"
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchGet "struct url *u" "const char *flags"
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchPut "struct url *u" "const char *flags"
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Ft int
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchStat "struct url *u" "struct url_stat *us" "const char *flags"
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Ft struct url_ent *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchList "struct url *u" "const char *flags"
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchXGetFile "struct url *u" "struct url_stat *us" "const char *flags"
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchGetFile "struct url *u" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchPutFile "struct url *u" "const char *flags"
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Ft int
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchStatFile "struct url *u" "struct url_stat *us" "const char *flags"
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Ft struct url_ent *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchListFile "struct url *u" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchXGetHTTP "struct url *u" "struct url_stat *us" "const char *flags"
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchGetHTTP "struct url *u" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchPutHTTP "struct url *u" "const char *flags"
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Ft int
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchStatHTTP "struct url *u" "struct url_stat *us" "const char *flags"
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Ft struct url_ent *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchListHTTP "struct url *u" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchXGetFTP "struct url *u" "struct url_stat *us" "const char *flags"
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchGetFTP "struct url *u" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Ft FILE *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchPutFTP "struct url *u" "const char *flags"
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Ft int
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchStatFTP "struct url *u" "struct url_stat *us" "const char *flags"
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Ft struct url_ent *
|
2001-04-24 00:06:21 +00:00
|
|
|
|
.Fn fetchListFTP "struct url *u" "const char *flags"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
|
These functions implement a high-level library for retrieving and
|
|
|
|
|
uploading files using Uniform Resource Locators (URLs).
|
|
|
|
|
.Pp
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.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
|
2000-05-11 15:22:52 +00:00
|
|
|
|
detailed in RFC1738.
|
|
|
|
|
A regular expression which produces this syntax is:
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.Bd -literal
|
|
|
|
|
<scheme>:(//(<user>(:<pwd>)?@)?<host>(:<port>)?)?/(<document>)?
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
2000-10-12 22:11:26 +00:00
|
|
|
|
If the URL does not seem to begin with a scheme name, the following
|
|
|
|
|
syntax is assumed:
|
|
|
|
|
.Bd -literal
|
|
|
|
|
((<user>(:<pwd>)?@)?<host>(:<port>)?)?/(<document>)?
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
2000-05-11 13:31:02 +00:00
|
|
|
|
Note that some components of the URL are not necessarily relevant to
|
|
|
|
|
all URL schemes.
|
2000-10-12 22:11:26 +00:00
|
|
|
|
For instance, the file scheme only needs the <scheme> and <document>
|
|
|
|
|
components.
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.Pp
|
2000-05-25 16:46:09 +00:00
|
|
|
|
.Fn fetchMakeURL
|
|
|
|
|
and
|
2000-05-15 08:34:42 +00:00
|
|
|
|
.Fn fetchParseURL
|
2000-05-25 16:46:09 +00:00
|
|
|
|
return a pointer to a
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt url
|
2000-05-15 08:34:42 +00:00
|
|
|
|
structure, which is defined as follows in
|
2003-09-08 19:57:22 +00:00
|
|
|
|
.In fetch.h :
|
2000-05-15 08:34:42 +00:00
|
|
|
|
.Bd -literal
|
|
|
|
|
#define URL_SCHEMELEN 16
|
|
|
|
|
#define URL_USERLEN 256
|
|
|
|
|
#define URL_PWDLEN 256
|
|
|
|
|
|
|
|
|
|
struct url {
|
|
|
|
|
char scheme[URL_SCHEMELEN+1];
|
|
|
|
|
char user[URL_USERLEN+1];
|
|
|
|
|
char pwd[URL_PWDLEN+1];
|
|
|
|
|
char host[MAXHOSTNAMELEN+1];
|
|
|
|
|
int port;
|
|
|
|
|
char *doc;
|
|
|
|
|
off_t offset;
|
|
|
|
|
size_t length;
|
2008-12-15 08:27:44 +00:00
|
|
|
|
time_t ims_time;
|
2000-05-15 08:34:42 +00:00
|
|
|
|
};
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
2008-12-15 08:27:44 +00:00
|
|
|
|
The
|
|
|
|
|
.Va ims_time
|
|
|
|
|
field stores the time value for
|
|
|
|
|
.Li If-Modified-Since
|
|
|
|
|
HTTP requests.
|
|
|
|
|
.Pp
|
2000-05-11 13:31:02 +00:00
|
|
|
|
The pointer returned by
|
2000-05-25 16:46:09 +00:00
|
|
|
|
.Fn fetchMakeURL
|
|
|
|
|
or
|
2000-05-11 13:31:02 +00:00
|
|
|
|
.Fn fetchParseURL
|
|
|
|
|
should be freed using
|
|
|
|
|
.Fn fetchFreeURL .
|
|
|
|
|
.Pp
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetURL ,
|
|
|
|
|
.Fn fetchGetURL ,
|
1998-09-26 20:42:44 +00:00
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutURL
|
|
|
|
|
constitute the recommended interface to the
|
|
|
|
|
.Nm fetch
|
2000-03-02 09:14:21 +00:00
|
|
|
|
library.
|
|
|
|
|
They examine the URL passed to them to determine the transfer
|
1998-09-26 20:42:44 +00:00
|
|
|
|
method, and call the appropriate lower-level functions to perform the
|
2000-03-02 09:14:21 +00:00
|
|
|
|
actual transfer.
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetURL
|
|
|
|
|
also returns the remote document's metadata in the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt url_stat
|
2000-07-17 21:25:00 +00:00
|
|
|
|
structure pointed to by the
|
|
|
|
|
.Fa us
|
|
|
|
|
argument.
|
|
|
|
|
.Pp
|
2001-07-15 07:53:42 +00:00
|
|
|
|
The
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Fa flags
|
2000-03-02 09:14:21 +00:00
|
|
|
|
argument is a string of characters which specify transfer options.
|
|
|
|
|
The
|
1998-09-26 20:42:44 +00:00
|
|
|
|
meaning of the individual flags is scheme-dependent, and is detailed
|
|
|
|
|
in the appropriate section below.
|
|
|
|
|
.Pp
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Fn fetchStatURL
|
|
|
|
|
attempts to obtain the requested document's metadata and fill in the
|
2001-04-15 19:53:47 +00:00
|
|
|
|
structure pointed to by its second argument.
|
2000-03-02 09:14:21 +00:00
|
|
|
|
The
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt url_stat
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
structure is defined as follows in
|
2003-09-08 19:57:22 +00:00
|
|
|
|
.In fetch.h :
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Bd -literal
|
|
|
|
|
struct url_stat {
|
|
|
|
|
off_t size;
|
1998-12-16 15:29:03 +00:00
|
|
|
|
time_t atime;
|
|
|
|
|
time_t mtime;
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
};
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
2000-05-15 08:34:42 +00:00
|
|
|
|
If the size could not be obtained from the server, the
|
|
|
|
|
.Fa size
|
|
|
|
|
field is set to -1.
|
|
|
|
|
If the modification time could not be obtained from the server, the
|
|
|
|
|
.Fa mtime
|
|
|
|
|
field is set to the epoch.
|
|
|
|
|
If the access time could not be obtained from the server, the
|
|
|
|
|
.Fa atime
|
|
|
|
|
field is set to the modification time.
|
|
|
|
|
.Pp
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Fn fetchListURL
|
|
|
|
|
attempts to list the contents of the directory pointed to by the URL
|
2000-03-02 09:14:21 +00:00
|
|
|
|
provided.
|
|
|
|
|
If successful, it returns a malloced array of
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt url_ent
|
2000-03-02 09:14:21 +00:00
|
|
|
|
structures.
|
|
|
|
|
The
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt url_ent
|
1998-12-21 19:41:50 +00:00
|
|
|
|
structure is defined as follows in
|
2003-09-08 19:57:22 +00:00
|
|
|
|
.In fetch.h :
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Bd -literal
|
|
|
|
|
struct url_ent {
|
2008-02-08 09:44:34 +00:00
|
|
|
|
char name[PATH_MAX];
|
1998-12-21 19:41:50 +00:00
|
|
|
|
struct url_stat stat;
|
|
|
|
|
};
|
|
|
|
|
.Ed
|
|
|
|
|
.Pp
|
|
|
|
|
The list is terminated by an entry with an empty name.
|
|
|
|
|
.Pp
|
|
|
|
|
The pointer returned by
|
|
|
|
|
.Fn fetchListURL
|
|
|
|
|
should be freed using
|
|
|
|
|
.Fn free .
|
|
|
|
|
.Pp
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGet ,
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Fn fetchGet ,
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Fn fetchPut
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
and
|
|
|
|
|
.Fn fetchStat
|
1998-09-26 20:42:44 +00:00
|
|
|
|
are similar to
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetURL ,
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Fn fetchGetURL ,
|
|
|
|
|
.Fn fetchPutURL
|
1998-07-09 16:52:44 +00:00
|
|
|
|
and
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Fn fetchStatURL ,
|
1998-09-26 20:42:44 +00:00
|
|
|
|
except that they expect a pre-parsed URL in the form of a pointer to
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
a
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt struct url
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
rather than a string.
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Pp
|
|
|
|
|
All of the
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetXXX ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Fn fetchGetXXX
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutXXX
|
|
|
|
|
functions return a pointer to a stream which can be used to read or
|
2000-03-02 09:14:21 +00:00
|
|
|
|
write data from or to the requested document, respectively.
|
|
|
|
|
Note that
|
1998-07-09 16:52:44 +00:00
|
|
|
|
although the implementation details of the individual access methods
|
|
|
|
|
vary, it can generally be assumed that a stream returned by one of the
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetXXX
|
|
|
|
|
or
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Fn fetchGetXXX
|
|
|
|
|
functions is read-only, and that a stream returned by one of the
|
|
|
|
|
.Fn fetchPutXXX
|
|
|
|
|
functions is write-only.
|
|
|
|
|
.Sh FILE SCHEME
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetFile ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Fn fetchGetFile
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutFile
|
|
|
|
|
provide access to documents which are files in a locally mounted file
|
2000-03-02 09:14:21 +00:00
|
|
|
|
system.
|
|
|
|
|
Only the <document> component of the URL is used.
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Pp
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetFile
|
|
|
|
|
and
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Fn fetchGetFile
|
2000-07-17 21:25:00 +00:00
|
|
|
|
do not accept any flags.
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Pp
|
|
|
|
|
.Fn fetchPutFile
|
|
|
|
|
accepts the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Ql a
|
2000-03-02 09:14:21 +00:00
|
|
|
|
(append to file) flag.
|
|
|
|
|
If that flag is specified, the data written to
|
1998-07-09 16:52:44 +00:00
|
|
|
|
the stream returned by
|
|
|
|
|
.Fn fetchPutFile
|
|
|
|
|
will be appended to the previous contents of the file, instead of
|
|
|
|
|
replacing them.
|
|
|
|
|
.Sh FTP SCHEME
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetFTP ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Fn fetchGetFTP
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutFTP
|
|
|
|
|
implement the FTP protocol as described in RFC959.
|
|
|
|
|
.Pp
|
|
|
|
|
If the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Ql p
|
1998-07-09 16:52:44 +00:00
|
|
|
|
(passive) flag is specified, a passive (rather than active) connection
|
|
|
|
|
will be attempted.
|
|
|
|
|
.Pp
|
2000-01-07 10:59:12 +00:00
|
|
|
|
If the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Ql l
|
2001-03-24 00:28:57 +00:00
|
|
|
|
(low) flag is specified, data sockets will be allocated in the low (or
|
2002-11-08 19:10:05 +00:00
|
|
|
|
default) port range instead of the high port range (see
|
2001-01-16 09:08:22 +00:00
|
|
|
|
.Xr ip 4 ) .
|
2000-01-07 10:59:12 +00:00
|
|
|
|
.Pp
|
|
|
|
|
If the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Ql d
|
2000-01-07 10:59:12 +00:00
|
|
|
|
(direct) flag is specified,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetFTP ,
|
2000-01-07 10:59:12 +00:00
|
|
|
|
.Fn fetchGetFTP
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutFTP
|
|
|
|
|
will use a direct connection even if a proxy server is defined.
|
|
|
|
|
.Pp
|
1998-07-09 16:52:44 +00:00
|
|
|
|
If no user name or password is given, the
|
|
|
|
|
.Nm fetch
|
2001-01-08 13:46:40 +00:00
|
|
|
|
library will attempt an anonymous login, with user name "anonymous"
|
|
|
|
|
and password "anonymous@<hostname>".
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh HTTP SCHEME
|
|
|
|
|
The
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetHTTP ,
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Fn fetchGetHTTP
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutHTTP
|
2000-03-02 09:14:21 +00:00
|
|
|
|
functions implement the HTTP/1.1 protocol.
|
2005-02-13 23:45:54 +00:00
|
|
|
|
With a little luck, there is
|
2001-05-26 19:38:34 +00:00
|
|
|
|
even a chance that they comply with RFC2616 and RFC2617.
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Pp
|
2000-01-07 10:59:12 +00:00
|
|
|
|
If the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Ql d
|
2000-01-07 10:59:12 +00:00
|
|
|
|
(direct) flag is specified,
|
2000-07-17 21:25:00 +00:00
|
|
|
|
.Fn fetchXGetHTTP ,
|
2000-01-07 10:59:12 +00:00
|
|
|
|
.Fn fetchGetHTTP
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchPutHTTP
|
|
|
|
|
will use a direct connection even if a proxy server is defined.
|
|
|
|
|
.Pp
|
2008-12-15 08:27:44 +00:00
|
|
|
|
If the
|
|
|
|
|
.Ql i
|
|
|
|
|
(if-modified-since) flag is specified, and
|
|
|
|
|
the
|
|
|
|
|
.Va ims_time
|
|
|
|
|
field is set in
|
|
|
|
|
.Vt "struct url" ,
|
|
|
|
|
then
|
|
|
|
|
.Fn fetchXGetHTTP
|
|
|
|
|
and
|
|
|
|
|
.Fn fetchGetHTTP
|
|
|
|
|
will send a conditional
|
|
|
|
|
.Li If-Modified-Since
|
|
|
|
|
HTTP header to only fetch the content if it is newer than
|
|
|
|
|
.Va ims_time .
|
|
|
|
|
.Pp
|
1998-07-09 16:52:44 +00:00
|
|
|
|
Since there seems to be no good way of implementing the HTTP PUT
|
|
|
|
|
method in a manner consistent with the rest of the
|
|
|
|
|
.Nm fetch
|
|
|
|
|
library,
|
|
|
|
|
.Fn fetchPutHTTP
|
|
|
|
|
is currently unimplemented.
|
2001-05-26 19:38:34 +00:00
|
|
|
|
.Sh AUTHENTICATION
|
|
|
|
|
Apart from setting the appropriate environment variables and
|
|
|
|
|
specifying the user name and password in the URL or the
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt struct url ,
|
2001-05-26 19:38:34 +00:00
|
|
|
|
the calling program has the option of defining an authentication
|
|
|
|
|
function with the following prototype:
|
|
|
|
|
.Pp
|
|
|
|
|
.Ft int
|
|
|
|
|
.Fn myAuthMethod "struct url *u"
|
|
|
|
|
.Pp
|
|
|
|
|
The callback function should fill in the
|
|
|
|
|
.Fa user
|
|
|
|
|
and
|
|
|
|
|
.Fa pwd
|
|
|
|
|
fields in the provided
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt struct url
|
2001-05-26 19:38:34 +00:00
|
|
|
|
and return 0 on success, or any other value to indicate failure.
|
|
|
|
|
.Pp
|
|
|
|
|
To register the authentication callback, simply set
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Va fetchAuthMethod
|
2001-05-26 19:38:34 +00:00
|
|
|
|
to point at it.
|
|
|
|
|
The callback will be used whenever a site requires authentication and
|
2005-02-13 22:25:33 +00:00
|
|
|
|
the appropriate environment variables are not set.
|
2001-05-26 19:38:34 +00:00
|
|
|
|
.Pp
|
|
|
|
|
This interface is experimental and may be subject to change.
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh RETURN VALUES
|
|
|
|
|
.Fn fetchParseURL
|
|
|
|
|
returns a pointer to a
|
2001-07-05 11:24:26 +00:00
|
|
|
|
.Vt struct url
|
2000-03-02 09:14:21 +00:00
|
|
|
|
containing the individual components of the URL.
|
|
|
|
|
If it is
|
1998-07-09 16:52:44 +00:00
|
|
|
|
unable to allocate memory, or the URL is syntactically incorrect,
|
|
|
|
|
.Fn fetchParseURL
|
|
|
|
|
returns a NULL pointer.
|
|
|
|
|
.Pp
|
2001-07-15 07:53:42 +00:00
|
|
|
|
The
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.Fn fetchStat
|
|
|
|
|
functions return 0 on success and -1 on failure.
|
|
|
|
|
.Pp
|
1998-07-09 16:52:44 +00:00
|
|
|
|
All other functions return a stream pointer which may be used to
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
access the requested document, or NULL if an error occurred.
|
|
|
|
|
.Pp
|
2000-05-25 16:24:31 +00:00
|
|
|
|
The following error codes are defined in
|
2003-09-08 19:57:22 +00:00
|
|
|
|
.In fetch.h :
|
2000-04-22 16:08:41 +00:00
|
|
|
|
.Bl -tag -width 18n
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_ABORT
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Operation aborted
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_AUTH
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Authentication failed
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_DOWN
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Service unavailable
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_EXISTS
|
2001-07-15 07:53:42 +00:00
|
|
|
|
File exists
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_FULL
|
2001-07-15 07:53:42 +00:00
|
|
|
|
File system full
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_INFO
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Informational response
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_MEMORY
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Insufficient memory
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_MOVED
|
2001-07-15 07:53:42 +00:00
|
|
|
|
File has moved
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_NETWORK
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Network error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_OK
|
2001-07-15 07:53:42 +00:00
|
|
|
|
No error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_PROTO
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Protocol error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_RESOLV
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Resolver error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_SERVER
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Server error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_TEMP
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Temporary error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_TIMEOUT
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Operation timed out
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_UNAVAIL
|
2001-07-15 07:53:42 +00:00
|
|
|
|
File is not available
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_UNKNOWN
|
2001-07-15 07:53:42 +00:00
|
|
|
|
Unknown error
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.It Bq Er FETCH_URL
|
|
|
|
|
Invalid URL
|
|
|
|
|
.El
|
|
|
|
|
.Pp
|
|
|
|
|
The accompanying error message includes a protocol-specific error code
|
2004-07-02 23:52:20 +00:00
|
|
|
|
and message, e.g.\& "File is not available (404 Not Found)"
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh ENVIRONMENT
|
2003-05-22 13:02:28 +00:00
|
|
|
|
.Bl -tag -width ".Ev FETCH_BIND_ADDRESS"
|
2003-03-03 12:35:03 +00:00
|
|
|
|
.It Ev FETCH_BIND_ADDRESS
|
|
|
|
|
Specifies a hostname or IP address to which sockets used for outgoing
|
|
|
|
|
connections will be bound.
|
2000-12-22 18:03:21 +00:00
|
|
|
|
.It Ev FTP_LOGIN
|
|
|
|
|
Default FTP login if none was provided in the URL.
|
2000-10-29 12:58:08 +00:00
|
|
|
|
.It Ev FTP_PASSIVE_MODE
|
2000-12-06 09:23:27 +00:00
|
|
|
|
If set to anything but
|
|
|
|
|
.Ql no ,
|
|
|
|
|
forces the FTP code to use passive mode.
|
2000-10-29 12:58:08 +00:00
|
|
|
|
.It Ev FTP_PASSWORD
|
|
|
|
|
Default FTP password if the remote server requests one and none was
|
|
|
|
|
provided in the URL.
|
2000-07-11 18:13:08 +00:00
|
|
|
|
.It Ev FTP_PROXY
|
2000-10-12 22:11:26 +00:00
|
|
|
|
URL of the proxy to use for FTP requests.
|
|
|
|
|
The document part is ignored.
|
|
|
|
|
FTP and HTTP proxies are supported; if no scheme is specified, FTP is
|
|
|
|
|
assumed.
|
|
|
|
|
If the proxy is an FTP proxy,
|
2000-07-21 10:57:15 +00:00
|
|
|
|
.Nm libfetch
|
|
|
|
|
will send
|
|
|
|
|
.Ql user@host
|
|
|
|
|
as user name to the proxy, where
|
|
|
|
|
.Ql user
|
|
|
|
|
is the real user name, and
|
|
|
|
|
.Ql host
|
|
|
|
|
is the name of the FTP server.
|
2000-10-12 16:55:52 +00:00
|
|
|
|
.Pp
|
2000-08-31 15:13:22 +00:00
|
|
|
|
If this variable is set to an empty string, no proxy will be used for
|
|
|
|
|
FTP requests, even if the
|
|
|
|
|
.Ev HTTP_PROXY
|
|
|
|
|
variable is set.
|
2001-03-07 04:45:55 +00:00
|
|
|
|
.It Ev ftp_proxy
|
|
|
|
|
Same as
|
|
|
|
|
.Ev FTP_PROXY ,
|
|
|
|
|
for compatibility.
|
2000-07-12 10:41:29 +00:00
|
|
|
|
.It Ev HTTP_AUTH
|
2000-10-12 16:55:52 +00:00
|
|
|
|
Specifies HTTP authorization parameters as a colon-separated list of
|
|
|
|
|
items.
|
2000-07-12 10:41:29 +00:00
|
|
|
|
The first and second item are the authorization scheme and realm
|
|
|
|
|
respectively; further items are scheme-dependent.
|
|
|
|
|
Currently, only basic authorization is supported.
|
2000-10-12 16:55:52 +00:00
|
|
|
|
.Pp
|
2000-07-12 10:41:29 +00:00
|
|
|
|
Basic authorization requires two parameters: the user name and
|
|
|
|
|
password, in that order.
|
2000-10-12 16:55:52 +00:00
|
|
|
|
.Pp
|
|
|
|
|
This variable is only used if the server requires authorization and
|
|
|
|
|
no user name or password was specified in the URL.
|
2000-07-11 18:13:08 +00:00
|
|
|
|
.It Ev HTTP_PROXY
|
2000-10-12 22:11:26 +00:00
|
|
|
|
URL of the proxy to use for HTTP requests.
|
|
|
|
|
The document part is ignored.
|
|
|
|
|
Only HTTP proxies are supported for HTTP requests.
|
2000-07-11 18:13:08 +00:00
|
|
|
|
If no port number is specified, the default is 3128.
|
2000-10-12 16:55:52 +00:00
|
|
|
|
.Pp
|
2000-10-12 22:11:26 +00:00
|
|
|
|
Note that this proxy will also be used for FTP documents, unless the
|
2000-07-21 10:57:15 +00:00
|
|
|
|
.Ev FTP_PROXY
|
|
|
|
|
variable is set.
|
2001-03-07 04:45:55 +00:00
|
|
|
|
.It Ev http_proxy
|
|
|
|
|
Same as
|
|
|
|
|
.Ev HTTP_PROXY ,
|
|
|
|
|
for compatibility.
|
2000-07-11 18:13:08 +00:00
|
|
|
|
.It Ev HTTP_PROXY_AUTH
|
2000-07-12 10:41:29 +00:00
|
|
|
|
Specifies authorization parameters for the HTTP proxy in the same
|
2000-07-21 10:57:15 +00:00
|
|
|
|
format as the
|
|
|
|
|
.Ev HTTP_AUTH
|
|
|
|
|
variable.
|
2000-10-12 16:55:52 +00:00
|
|
|
|
.Pp
|
2000-10-12 22:11:26 +00:00
|
|
|
|
This variable is used if and only if connected to an HTTP proxy, and
|
|
|
|
|
is ignored if a user and/or a password were specified in the proxy
|
|
|
|
|
URL.
|
2002-11-28 12:07:15 +00:00
|
|
|
|
.It Ev HTTP_REFERER
|
2002-12-27 12:15:40 +00:00
|
|
|
|
Specifies the referrer URL to use for HTTP requests.
|
2002-11-28 12:07:15 +00:00
|
|
|
|
If set to
|
|
|
|
|
.Dq auto ,
|
2002-12-27 12:15:40 +00:00
|
|
|
|
the document URL will be used as referrer URL.
|
2001-05-27 11:00:36 +00:00
|
|
|
|
.It Ev HTTP_USER_AGENT
|
|
|
|
|
Specifies the User-Agent string to use for HTTP requests.
|
|
|
|
|
This can be useful when working with HTTP origin or proxy servers that
|
2001-07-05 11:24:26 +00:00
|
|
|
|
differentiate between user agents.
|
2003-01-22 18:27:25 +00:00
|
|
|
|
.It Ev NETRC
|
|
|
|
|
Specifies a file to use instead of
|
|
|
|
|
.Pa ~/.netrc
|
|
|
|
|
to look up login names and passwords for FTP sites.
|
|
|
|
|
See
|
|
|
|
|
.Xr ftp 1
|
|
|
|
|
for a description of the file format.
|
|
|
|
|
This feature is experimental.
|
2007-12-18 11:03:26 +00:00
|
|
|
|
.It Ev NO_PROXY
|
|
|
|
|
Either a single asterisk, which disables the use of proxies
|
|
|
|
|
altogether, or a comma- or whitespace-separated list of hosts for
|
|
|
|
|
which proxies should not be used.
|
|
|
|
|
.It Ev no_proxy
|
|
|
|
|
Same as
|
|
|
|
|
.Ev NO_PROXY ,
|
|
|
|
|
for compatibility.
|
2000-07-11 18:13:08 +00:00
|
|
|
|
.El
|
2003-06-10 20:41:18 +00:00
|
|
|
|
.Sh EXAMPLES
|
|
|
|
|
To access a proxy server on
|
|
|
|
|
.Pa proxy.example.com
|
|
|
|
|
port 8080, set the
|
|
|
|
|
.Ev HTTP_PROXY
|
|
|
|
|
environment variable in a manner similar to this:
|
|
|
|
|
.Pp
|
|
|
|
|
.Dl HTTP_PROXY=http://proxy.example.com:8080
|
|
|
|
|
.Pp
|
|
|
|
|
If the proxy server requires authentication, there are
|
|
|
|
|
two options available for passing the authentication data.
|
|
|
|
|
The first method is by using the proxy URL:
|
|
|
|
|
.Pp
|
|
|
|
|
.Dl HTTP_PROXY=http://<user>:<pwd>@proxy.example.com:8080
|
|
|
|
|
.Pp
|
|
|
|
|
The second method is by using the
|
|
|
|
|
.Ev HTTP_PROXY_AUTH
|
|
|
|
|
environment variable:
|
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
|
HTTP_PROXY=http://proxy.example.com:8080
|
|
|
|
|
HTTP_PROXY_AUTH=basic:*:<user>:<pwd>
|
|
|
|
|
.Ed
|
2007-12-18 11:03:26 +00:00
|
|
|
|
.Pp
|
|
|
|
|
To disable the use of a proxy for an HTTP server running on the local
|
|
|
|
|
host, define
|
|
|
|
|
.Ev NO_PROXY
|
|
|
|
|
as follows:
|
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
|
NO_PROXY=localhost,127.0.0.1
|
|
|
|
|
.Ed
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh SEE ALSO
|
|
|
|
|
.Xr fetch 1 ,
|
2000-01-07 10:59:12 +00:00
|
|
|
|
.Xr ftpio 3 ,
|
2001-01-08 13:46:40 +00:00
|
|
|
|
.Xr ip 4
|
|
|
|
|
.Rs
|
|
|
|
|
.%A J. Postel
|
|
|
|
|
.%A J. K. Reynolds
|
|
|
|
|
.%D October 1985
|
|
|
|
|
.%B File Transfer Protocol
|
|
|
|
|
.%O RFC959
|
|
|
|
|
.Re
|
|
|
|
|
.Rs
|
|
|
|
|
.%A P. Deutsch
|
|
|
|
|
.%A A. Emtage
|
|
|
|
|
.%A A. Marine.
|
|
|
|
|
.%D May 1994
|
|
|
|
|
.%T How to Use Anonymous FTP
|
|
|
|
|
.%O RFC1635
|
2001-01-16 11:52:00 +00:00
|
|
|
|
.Re
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Rs
|
2000-05-10 09:49:04 +00:00
|
|
|
|
.%A T. Berners-Lee
|
|
|
|
|
.%A L. Masinter
|
|
|
|
|
.%A M. McCahill
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.%D December 1994
|
|
|
|
|
.%T Uniform Resource Locators (URL)
|
|
|
|
|
.%O RFC1738
|
|
|
|
|
.Re
|
|
|
|
|
.Rs
|
2000-05-10 09:49:04 +00:00
|
|
|
|
.%A R. Fielding
|
|
|
|
|
.%A J. Gettys
|
|
|
|
|
.%A J. Mogul
|
|
|
|
|
.%A H. Frystyk
|
2001-05-26 19:38:34 +00:00
|
|
|
|
.%A L. Masinter
|
|
|
|
|
.%A P. Leach
|
2000-05-10 09:49:04 +00:00
|
|
|
|
.%A T. Berners-Lee
|
2002-11-08 19:10:05 +00:00
|
|
|
|
.%D January 1999
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.%B Hypertext Transfer Protocol -- HTTP/1.1
|
2001-05-26 19:38:34 +00:00
|
|
|
|
.%O RFC2616
|
|
|
|
|
.Re
|
|
|
|
|
.Rs
|
|
|
|
|
.%A J. Franks
|
|
|
|
|
.%A P. Hallam-Baker
|
|
|
|
|
.%A J. Hostetler
|
|
|
|
|
.%A S. Lawrence
|
|
|
|
|
.%A P. Leach
|
|
|
|
|
.%A A. Luotonen
|
|
|
|
|
.%A L. Stewart
|
|
|
|
|
.%D June 1999
|
|
|
|
|
.%B HTTP Authentication: Basic and Digest Access Authentication
|
|
|
|
|
.%O RFC2617
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Re
|
|
|
|
|
.Sh HISTORY
|
|
|
|
|
The
|
|
|
|
|
.Nm fetch
|
|
|
|
|
library first appeared in
|
|
|
|
|
.Fx 3.0 .
|
|
|
|
|
.Sh AUTHORS
|
2000-11-22 09:23:54 +00:00
|
|
|
|
.An -nosplit
|
1998-07-09 16:52:44 +00:00
|
|
|
|
The
|
|
|
|
|
.Nm fetch
|
|
|
|
|
library was mostly written by
|
2004-01-25 11:39:42 +00:00
|
|
|
|
.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
|
1998-07-09 16:52:44 +00:00
|
|
|
|
with numerous suggestions from
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
.An Jordan K. Hubbard Aq jkh@FreeBSD.org ,
|
|
|
|
|
.An Eugene Skepner Aq eu@qub.com
|
2000-11-14 11:20:58 +00:00
|
|
|
|
and other
|
|
|
|
|
.Fx
|
|
|
|
|
developers.
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
It replaces the older
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Nm ftpio
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
library written by
|
2005-11-30 04:08:45 +00:00
|
|
|
|
.An Poul-Henning Kamp Aq phk@FreeBSD.org
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
and
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.An Jordan K. Hubbard Aq jkh@FreeBSD.org .
|
|
|
|
|
.Pp
|
|
|
|
|
This manual page was written by
|
2004-01-25 11:39:42 +00:00
|
|
|
|
.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
|
1998-07-09 16:52:44 +00:00
|
|
|
|
.Sh BUGS
|
2000-03-02 09:14:21 +00:00
|
|
|
|
Some parts of the library are not yet implemented.
|
|
|
|
|
The most notable
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
examples of this are
|
|
|
|
|
.Fn fetchPutHTTP ,
|
1998-12-21 19:41:50 +00:00
|
|
|
|
.Fn fetchListHTTP ,
|
2000-04-22 16:08:41 +00:00
|
|
|
|
.Fn fetchListFTP
|
Second of a series of cleanups to libfetch.
This commit introduces the following features:
a) the fetchStat*() functions, which return meta-information for a
document, such as size, modification time, etc.
b) the use of the com_err(3) facilities to report errors.
It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.
Changed files, in alphabetical order:
Makefile:
Don't generate macros in {ftp,http}err.c.
Generate category fields for the error message lists.
Compile the error table.
Install fetch_err.h along with fetch.h.
common.c:
Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
error code in the _netdb_seterr() macro.
Add categories to the _netdb_errlist table.
Report errors through the Common Error library.
common.h:
Add the DEBUG macros.
Add prototype for fetchConnect().
Remove the prototype for _fetch_errstring(), which is local to common.c
Add a categroy field to struct fetcherr, and define constants for
error categories.
Define macros for _{url,netdb,ftp,http}_seterr().
errors.et: (new file)
List error categories.
fetch.3:
Document the fetchStat*() functions.
Move the "unimplemented functionality" comments from NOTES to BUGS.
Document that applications which use libfetch must also use
libcom_err, and list existing error codes.
Undocument fetchLastErr{Code,String}.
Remove the (empty) DIAGNOSTICS section.
Mention Eugene Skepner in the AUTHORS section.
fetch.c:
Move the DEBUG macros to common.c
Add fetchStat() and fetchStatURL().
Generate error messages for URL parser errors, and fix a minor bug
in the parser.
Use 'struct url' instead of 'url_t'.
Remove fetchLastErr{Code,String}.
fetch.h:
Use 'struct url' instead of 'url_t', and remove the typedef.
Define struct url_stat (used by fetchStat()).
Add prototypes for fetchStat*().
Remove the declarations for fetchLastErr{Code,String}.
Include fetch_err.h.
fetch_err.et: (new file)
Error table for libfetch.
file.c:
Add fetchStatFile().
Use 'struct url' instead of 'url_t'.
ftp.c:
Add fetchStatFTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErrCode.
ftp.errors:
Add categories to all error messages.
http.c:
Add fetchStatHTTP().
Use 'struct url' instead of 'url_t'.
Don't use fetchLastErr{Code,Text}.
http.errors:
Add categories to all error messages.
Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
|
|
|
|
and FTP proxy support.
|
|
|
|
|
.Pp
|
2005-02-13 23:45:54 +00:00
|
|
|
|
There is no way to select a proxy at run-time other than setting the
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Ev HTTP_PROXY
|
|
|
|
|
or
|
|
|
|
|
.Ev FTP_PROXY
|
2000-03-02 09:14:21 +00:00
|
|
|
|
environment variables as appropriate.
|
2000-07-12 10:41:29 +00:00
|
|
|
|
.Pp
|
1998-11-05 19:48:17 +00:00
|
|
|
|
.Nm libfetch
|
2000-07-12 10:41:29 +00:00
|
|
|
|
does not understand or obey 305 (Use Proxy) replies.
|
|
|
|
|
.Pp
|
1998-11-05 19:48:17 +00:00
|
|
|
|
Error numbers are unique only within a certain context; the error
|
|
|
|
|
codes used for FTP and HTTP overlap, as do those used for resolver and
|
2000-03-02 09:14:21 +00:00
|
|
|
|
system errors.
|
|
|
|
|
For instance, error code 202 means "Command not
|
1998-11-05 19:48:17 +00:00
|
|
|
|
implemented, superfluous at this site" in an FTP context and
|
|
|
|
|
"Accepted" in an HTTP context.
|
|
|
|
|
.Pp
|
2000-01-07 10:59:12 +00:00
|
|
|
|
.Fn fetchStatFTP
|
|
|
|
|
does not check that the result of an MDTM command is a valid date.
|
|
|
|
|
.Pp
|
2000-07-17 21:25:00 +00:00
|
|
|
|
The man page is incomplete, poorly written and produces badly
|
|
|
|
|
formatted text.
|
1998-09-26 20:42:44 +00:00
|
|
|
|
.Pp
|
2000-05-25 16:24:31 +00:00
|
|
|
|
The error reporting mechanism is unsatisfactory.
|
|
|
|
|
.Pp
|
|
|
|
|
Some parts of the code are not fully reentrant.
|