2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef _SQUID_ERR_TYPE_H
10 #define _SQUID_ERR_TYPE_H
15 /* Access Permission Errors. Prefix new with ERR_ACCESS_ */
17 ERR_CACHE_ACCESS_DENIED
,
18 ERR_CACHE_MGR_ACCESS_DENIED
,
19 ERR_FORWARDING_DENIED
,
29 ERR_SECURE_CONNECT_FAIL
,
37 ERR_ONLY_IF_CACHED_MISS
, /* failure to satisfy only-if-cached request */
40 ERR_UNSUP_HTTPVERSION
, /* HTTP version is not supported */
45 ERR_PRECONDITION_FAILED
,
55 ERR_FTP_PUT_CREATED
, /* !error,a note that the file was created */
56 ERR_FTP_PUT_MODIFIED
, /* modified, !created */
59 ERR_ESI
, /* Failure to perform ESI processing */
68 ERR_DIR_LISTING
, /* Display of remote directory (FTP, Gopher) */
69 ERR_SQUID_SIGNATURE
, /* not really an error */
73 // NOTE: error types defined below TCP_RESET are optional and do not generate
74 // a log warning if the files are missing
75 TCP_RESET
, // Send TCP RST packet instead of error page
77 ERR_SECURE_ACCEPT_FAIL
, // Rejects the SSL connection intead of error page
78 ERR_REQUEST_START_TIMEOUT
, // Aborts the connection instead of error page
79 ERR_REQUEST_PARSE_TIMEOUT
, // Aborts the connection instead of error page
80 ERR_RELAY_REMOTE
, // Sends server reply instead of error page
82 /* Cache Manager GUI can install a manager index/home page */
88 extern const char *err_type_str
[];
92 errorTypeByName(const char *name
)
94 for (int i
= 0; i
< ERR_MAX
; ++i
)
95 if (strcmp(name
, err_type_str
[i
]) == 0)
102 errorTypeName(err_type err
)
104 if (err
< ERR_NONE
|| err
>= ERR_MAX
)
106 return err_type_str
[err
];
109 #endif /* _SQUID_ERR_TYPE_H */