summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/http.errors
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1998-11-06 22:14:08 +0000
committerdes <des@FreeBSD.org>1998-11-06 22:14:08 +0000
commit93ce759c73e21f7ac6642b79a8e6146522b452aa (patch)
treef7eca0835b20fb3b31b3e447f024ef540f77afe0 /lib/libfetch/http.errors
parentf2ceee99496bf97c1d2ffff9c8e7fd6a79474f2e (diff)
downloadFreeBSD-src-93ce759c73e21f7ac6642b79a8e6146522b452aa.zip
FreeBSD-src-93ce759c73e21f7ac6642b79a8e6146522b452aa.tar.gz
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
Diffstat (limited to 'lib/libfetch/http.errors')
-rw-r--r--lib/libfetch/http.errors76
1 files changed, 38 insertions, 38 deletions
diff --git a/lib/libfetch/http.errors b/lib/libfetch/http.errors
index c0e3539..26907d5 100644
--- a/lib/libfetch/http.errors
+++ b/lib/libfetch/http.errors
@@ -1,41 +1,41 @@
-# $Id$
+# $Id: http.errors,v 1.1.1.1 1998/07/09 16:52:44 des Exp $
#
# This list is taken from RFC 2068.
#
-100 Continue
-101 Switching Protocols
-200 OK
-201 Created
-202 Accepted
-203 Non-Authoritative Information
-204 No Content
-205 Reset Content
-206 Partial Content
-300 Multiple Choices
-301 Moved Permanently
-302 Moved Temporarily
-303 See Other
-304 Not Modified
-305 Use Proxy
-400 Bad Request
-401 Unauthorized
-402 Payment Required
-403 Forbidden
-404 Not Found
-405 Method Not Allowed
-406 Not Acceptable
-407 Proxy Authentication Required
-408 Request Time-out
-409 Conflict
-410 Gone
-411 Length Required
-412 Precondition Failed
-413 Request Entity Too Large
-414 Request-URI Too Large
-415 Unsupported Media Type
-500 Internal Server Error
-501 Not Implemented
-502 Bad Gateway
-503 Service Unavailable
-504 Gateway Time-out
-505 HTTP Version not supported
+100 OK Continue
+101 OK Switching Protocols
+200 OK OK
+201 OK Created
+202 OK Accepted
+203 INFO Non-Authoritative Information
+204 OK No Content
+205 OK Reset Content
+206 OK Partial Content
+300 MOVED Multiple Choices
+301 MOVED Moved Permanently
+302 MOVED Moved Temporarily
+303 MOVED See Other
+304 OK Not Modified
+305 INFO Use Proxy
+400 PROTO Bad Request
+401 AUTH Unauthorized
+402 AUTH Payment Required
+403 AUTH Forbidden
+404 UNAVAIL Not Found
+405 PROTO Method Not Allowed
+406 PROTO Not Acceptable
+407 AUTH Proxy Authentication Required
+408 TIMEOUT Request Time-out
+409 EXISTS Conflict
+410 UNAVAIL Gone
+411 PROTO Length Required
+412 SERVER Precondition Failed
+413 PROTO Request Entity Too Large
+414 PROTO Request-URI Too Large
+415 PROTO Unsupported Media Type
+500 SERVER Internal Server Error
+501 PROTO Not Implemented
+502 SERVER Bad Gateway
+503 TEMP Service Unavailable
+504 TIMEOUT Gateway Time-out
+505 PROTO HTTP Version not supported
OpenPOWER on IntegriCloud