StatusCode.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 #ifndef _SQUID_SRC_HTTP_STATUSCODE_H
10 #define _SQUID_SRC_HTTP_STATUSCODE_H
11 
12 namespace Http
13 {
14 
20 typedef enum {
21  scNone = 0,
22  scContinue = 100,
24  scProcessing = 102,
25  scEarlyHints = 103,
26  scOkay = 200,
27  scCreated = 201,
28  scAccepted = 202,
30  scNoContent = 204,
33  scMultiStatus = 207,
35  scImUsed = 226,
38  scFound = 302,
39  scSeeOther = 303,
41  scUseProxy = 305,
44  scBadRequest = 400,
47  scForbidden = 403,
48  scNotFound = 404,
53  scConflict = 409,
54  scGone = 410,
58  scUriTooLong = 414,
64  scLocked = 423,
73  scBadGateway = 502,
80  scNotExtended = 510,
83  // The 6xx codes below are for internal use only: Bad requests result
84  // in scBadRequest; bad responses in scGatewayTimeout.
85 
87  scHeaderTooLarge = 601 /* Header too large to process */
88 } StatusCode;
89 
90 const char *StatusCodeString(const Http::StatusCode status);
92 inline bool Is1xx(const int sc) { return scContinue <= sc && sc < scOkay; }
94 inline bool ProhibitsContentLength(const StatusCode sc) { return sc == scNoContent || Is1xx(sc); }
95 
96 } // namespace Http
97 
98 #endif /* _SQUID_SRC_HTTP_STATUSCODE_H */
99 
const char * StatusCodeString(const Http::StatusCode status)
Definition: StatusCode.cc:14
static int sc[16]
Definition: smbdes.c:121
bool ProhibitsContentLength(const StatusCode sc)
whether this response status code prohibits sending Content-Length
Definition: StatusCode.h:94
StatusCode
Definition: StatusCode.h:20
bool Is1xx(const int sc)
whether this is an informational 1xx response status code
Definition: StatusCode.h:92

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors