File: status.xml

package info (click to toggle)
neon27 0.36.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,836 kB
  • sloc: ansic: 27,754; xml: 4,634; makefile: 629; sh: 328
file content (91 lines) | stat: -rw-r--r-- 2,920 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    <refentry id="refstatus">

      <refmeta>
	<refentrytitle>ne_status</refentrytitle>
	<manvolnum>3</manvolnum>
      </refmeta>

      <refnamediv>
	<refname id="ne_status">ne_status</refname>
	<refpurpose>HTTP status structure</refpurpose>
      </refnamediv>
      
      <refsynopsisdiv>
	
	<funcsynopsis><funcsynopsisinfo>#include &lt;ne_utils.h&gt;

typedef struct {
    int major_version;
    int minor_version;
    int code;
    int klass;
    char *reason_phrase;
} <type>ne_status</type>;</funcsynopsisinfo></funcsynopsis>
	
      </refsynopsisdiv>

      <refsect1>
	<title>Description</title>

	<para>The <type>ne_status</type> type represents an HTTP
	response status; used in response messages giving a result of
	request.  The <structfield>major_version</structfield> and
	<structfield>minor_version</structfield> fields give the
	protocol version supported by the server issuing the response.
	The <structfield>code</structfield> field gives the status
	code of the result (lying between <literal>100</literal> and
	<literal>599</literal> inclusive), and the
	<structfield>klass</structfield> field gives the class, which
	is equal to the most significant digit of the status. The
	<structfield>reason_phrase</structfield> field gives a
	human-readable string describing the status, which is purely
	informational (and optional) - any interpretation of the
	response status must be done using the
	<structfield>klass</structfield> and/or
	<structfield>code</structfield> fields.</para>

	<para>There are five classes of response status code defined
	for HTTP/1.1 (see <ulink
	url="https://www.rfc-editor.org/rfc/rfc9110#name-status-codes">RFC
	9110 ẞ15</ulink>):</para>
	
	<variablelist>
	  <varlistentry>
	    <term><literal>1xx</literal></term>
	    <listitem><simpara>Informational response.</simpara></listitem>
	  </varlistentry>

	  <varlistentry>
	    <term><literal>2xx</literal></term>
	    <listitem><simpara>Success: the operation was successful</simpara></listitem>
	  </varlistentry>

	  <varlistentry>
	    <term><literal>3xx</literal></term>
	    <listitem><simpara>Redirection</simpara></listitem>
	  </varlistentry>

	  <varlistentry>
	    <term><literal>4xx</literal></term> <listitem><simpara>Client
	    error: the request made was incorrect in some
	    manner.</simpara></listitem>
	  </varlistentry>

	  <varlistentry>
	    <term><literal>5xx</literal></term>
	    <listitem><simpara>Server error</simpara></listitem>
	  </varlistentry>
	</variablelist>

      </refsect1>

      <refsect1> <title>Notes</title> <para>The
      <structfield>klass</structfield> field is named
      <quote>klass</quote> not <quote>class</quote> so that the header
      can be used from a C++ program, in which <quote>class</quote> is
      a reserved word.</para></refsect1>

      <refsect1> <title>See also</title> <para><xref
linkend="ne_get_status"/>.</para> </refsect1>

    </refentry>