status.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <refentry id="refstatus">
  2. <refmeta>
  3. <refentrytitle>ne_status</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. </refmeta>
  6. <refnamediv>
  7. <refname id="ne_status">ne_status</refname>
  8. <refpurpose>HTTP status structure</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <funcsynopsis><funcsynopsisinfo>#include &lt;ne_utils.h&gt;
  12. typedef struct {
  13. int major_version, minor_version;
  14. int code, klass;
  15. const char *reason_phrase;
  16. } <type>ne_status</type>;</funcsynopsisinfo></funcsynopsis>
  17. </refsynopsisdiv>
  18. <refsect1>
  19. <title>Description</title>
  20. <para>An <type>ne_status</type> type represents an HTTP
  21. response status; used in response messages giving a result of request.
  22. The <structfield>major_version</structfield> and
  23. <structfield>minor_version</structfield> fields give the HTTP version
  24. supported by the server issuing the response. The
  25. <structfield>code</structfield> field gives the status code of the
  26. result (lying between 100 and 999 inclusive), and the
  27. <structfield>klass</structfield> field gives the
  28. class<footnote><para>the field is named <quote>klass</quote> not
  29. <quote>class</quote> so that the header can be used from a C++
  30. program, in which <quote>class</quote> is a reserved
  31. word)</para></footnote>, which is equal to the most significant digit
  32. of the status.</para>
  33. <para>There are five classes of HTTP status code defined by
  34. RFC2616:</para>
  35. <variablelist>
  36. <varlistentry>
  37. <term><literal>1xx</literal></term>
  38. <listitem><simpara>Informational response.</simpara></listitem>
  39. </varlistentry>
  40. <varlistentry>
  41. <term><literal>2xx</literal></term>
  42. <listitem><simpara>Success: the operation was successful</simpara></listitem>
  43. </varlistentry>
  44. <varlistentry>
  45. <term><literal>3xx</literal></term>
  46. <listitem><simpara>Redirection</simpara></listitem>
  47. </varlistentry>
  48. <varlistentry>
  49. <term><literal>4xx</literal></term> <listitem><simpara>Client
  50. error: the request made was incorrect in some
  51. manner.</simpara></listitem>
  52. </varlistentry>
  53. <varlistentry>
  54. <term><literal>5xx</literal></term>
  55. <listitem><simpara>Server error</simpara></listitem>
  56. </varlistentry>
  57. </variablelist>
  58. </refsect1>
  59. <refsect1> <title>See also</title> <para><xref
  60. linkend="ne_get_status"/>.</para> </refsect1>
  61. </refentry>