summaryrefslogtreecommitdiff
path: root/doc/ref/reqopts.xml
blob: b4a6272ac88111f4eb8739e3258f6dc6f72f9647 (plain)
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
<refentry id="refreqopts">

  <refmeta>
    <refentrytitle>ne_set_request_expect100</refentrytitle>
    <manvolnum>3</manvolnum>
  </refmeta>

  <refnamediv>
    <refname id="ne_set_request_expect100">ne_set_request_expect100</refname>
    <refpurpose>function to enable Expect: 100-continue support</refpurpose>
  </refnamediv>
  
  <refsynopsisdiv>

    <funcsynopsis>

      <funcsynopsisinfo>#include &lt;ne_request.h&gt;</funcsynopsisinfo>

      <funcprototype>
        <funcdef>void <function>ne_set_request_expect100</function></funcdef>
        <paramdef>ne_session *<parameter>session</parameter></paramdef>
        <paramdef>int <parameter>flag</parameter></paramdef>
      </funcprototype>

    </funcsynopsis>

  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para>An extension introduced in the HTTP/1.1 specification was
    the use of the <literal>Expect: 100-continue</literal> header.
    This header allows an HTTP client to be informed of the expected
    response status before the request message body is sent: a useful
    optimisation for situations where a large message body is to be
    sent.  The <function>ne_set_request_expect100</function> function
    can be used to enable this feature by passing the
    <parameter>flag</parameter> parameter as any non-zero
    integer.</para>

    <warning><para>Unfortunately, if this header is sent to a server
    which is not fully compliant with the HTTP/1.1 specification, a
    deadlock occurs resulting in a temporarily "hung" connection.
    neon will recover gracefully from this situation, but only after a
    15 second timeout.  It is highly recommended that this option is
    not enabled unless it is known that the server in use correctly
    implements <literal>Expect: 100-continue</literal>
    support.</para></warning>

  </refsect1>

  <refsect1>
    <title>See also</title>

    <para><xref linkend="ne_request_create"/>.</para>

  </refsect1>

</refentry>