GNU libmicrohttpd 1.0.1
Loading...
Searching...
No Matches
reason_phrase.c File Reference

Tables of the string response phrases. More...

#include "platform.h"
#include "microhttpd.h"
#include "mhd_str.h"
Include dependency graph for reason_phrase.c:

Go to the source code of this file.

Macros

#define NULL   ((void*) 0)
 
#define BLOCK(m)
 

Functions

_MHD_EXTERN const char * MHD_get_reason_phrase_for (unsigned int code)
 
_MHD_EXTERN size_t MHD_get_reason_phrase_len_for (unsigned int code)
 

Variables

static const struct _MHD_cstr_w_len invalid_hundred []
 
static const struct _MHD_cstr_w_len one_hundred []
 
static const struct _MHD_cstr_w_len two_hundred []
 
static const struct _MHD_cstr_w_len three_hundred []
 
static const struct _MHD_cstr_w_len four_hundred []
 
static const struct _MHD_cstr_w_len five_hundred []
 
static const struct MHD_Reason_Block reasons []
 

Detailed Description

Tables of the string response phrases.

Author
Elliot Glaysher
Christian Grothoff (minor code clean up)
Karlson2k (Evgeny Grin)

Definition in file reason_phrase.c.

Macro Definition Documentation

◆ BLOCK

#define BLOCK ( m)
Value:
{ (sizeof(m) / sizeof(m[0])), m }

Definition at line 166 of file reason_phrase.c.

◆ NULL

#define NULL   ((void*) 0)

Definition at line 33 of file reason_phrase.c.

Function Documentation

◆ MHD_get_reason_phrase_for()

_MHD_EXTERN const char * MHD_get_reason_phrase_for ( unsigned int code)

Returns the string reason phrase for a response code.

If message string is not available for a status code, "Unknown" string will be returned.

Definition at line 179 of file reason_phrase.c.

References reasons.

Referenced by build_header_response(), and build_header_response().

Here is the caller graph for this function:

◆ MHD_get_reason_phrase_len_for()

_MHD_EXTERN size_t MHD_get_reason_phrase_len_for ( unsigned int code)

Returns the length of the string reason phrase for a response code.

If message string is not available for a status code, 0 is returned.

Definition at line 190 of file reason_phrase.c.

References reasons.

Referenced by build_header_response().

Here is the caller graph for this function:

Variable Documentation

◆ five_hundred

const struct _MHD_cstr_w_len five_hundred[]
static
Initial value:
= {
_MHD_S_STR_W_LEN ("Internal Server Error"),
_MHD_S_STR_W_LEN ("Not Implemented"),
_MHD_S_STR_W_LEN ("Bad Gateway"),
_MHD_S_STR_W_LEN ("Service Unavailable"),
_MHD_S_STR_W_LEN ("Gateway Timeout"),
_MHD_S_STR_W_LEN ("HTTP Version Not Supported"),
_MHD_S_STR_W_LEN ("Variant Also Negotiates"),
_MHD_S_STR_W_LEN ("Insufficient Storage"),
_MHD_S_STR_W_LEN ("Loop Detected"),
_MHD_S_STR_W_LEN ("Bandwidth Limit Exceeded"),
_MHD_S_STR_W_LEN ("Not Extended"),
_MHD_S_STR_W_LEN ("Network Authentication Required")
}
#define _MHD_S_STR_W_LEN(str)

Definition at line 144 of file reason_phrase.c.

◆ four_hundred

const struct _MHD_cstr_w_len four_hundred[]
static

Definition at line 89 of file reason_phrase.c.

◆ invalid_hundred

const struct _MHD_cstr_w_len invalid_hundred[]
static
Initial value:
= {
{ NULL, 0 }
}
#define NULL

Definition at line 36 of file reason_phrase.c.

◆ one_hundred

const struct _MHD_cstr_w_len one_hundred[]
static
Initial value:
= {
_MHD_S_STR_W_LEN ("Continue"),
_MHD_S_STR_W_LEN ("Switching Protocols"),
_MHD_S_STR_W_LEN ("Processing"),
_MHD_S_STR_W_LEN ("Early Hints")
}

Definition at line 40 of file reason_phrase.c.

◆ reasons

const struct MHD_Reason_Block reasons[]
static
Initial value:
= {
}
static const char *const two_hundred[]
#define BLOCK(m)
static const char *const five_hundred[]
static const char *const invalid_hundred[]
static const char *const three_hundred[]
static const char *const four_hundred[]
static const char *const one_hundred[]

Definition at line 168 of file reason_phrase.c.

◆ three_hundred

const struct _MHD_cstr_w_len three_hundred[]
static
Initial value:
= {
_MHD_S_STR_W_LEN ("Multiple Choices"),
_MHD_S_STR_W_LEN ("Moved Permanently"),
_MHD_S_STR_W_LEN ("Found"),
_MHD_S_STR_W_LEN ("See Other"),
_MHD_S_STR_W_LEN ("Not Modified"),
_MHD_S_STR_W_LEN ("Use Proxy"),
_MHD_S_STR_W_LEN ("Switch Proxy"),
_MHD_S_STR_W_LEN ("Temporary Redirect"),
_MHD_S_STR_W_LEN ("Permanent Redirect")
}

Definition at line 77 of file reason_phrase.c.

◆ two_hundred

const struct _MHD_cstr_w_len two_hundred[]
static
Initial value:
= {
_MHD_S_STR_W_LEN ("Created"),
_MHD_S_STR_W_LEN ("Accepted"),
_MHD_S_STR_W_LEN ("Non-Authoritative Information"),
_MHD_S_STR_W_LEN ("No Content"),
_MHD_S_STR_W_LEN ("Reset Content"),
_MHD_S_STR_W_LEN ("Partial Content"),
_MHD_S_STR_W_LEN ("Multi-Status"),
_MHD_S_STR_W_LEN ("Already Reported"),
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
{"Unknown", 0},
_MHD_S_STR_W_LEN ("IM Used")
}

Definition at line 47 of file reason_phrase.c.