using.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <sect1 id="using">
  2. <title>How to use neon from your application</title>
  3. <para>This section describes how to add &neon; support to an
  4. application. If you just want to quickly try out &neon;, use
  5. the <xref linkend="refconfig"/> script.</para>
  6. <para>The &neon; source code is designed to be easily embedded
  7. into an application source tree. &neon; has no dependencies on
  8. libraries other than an SSL toolkit and XML parser, though the
  9. source tree can be configured to have no support for SSL or XML
  10. if desired. To configure the &neon; source code some <ulink
  11. url="http://www.gnu.org/software/autoconf/">GNU autoconf</ulink>
  12. macros are supplied, which can be used in a number of ways, as
  13. follows:</para>
  14. <itemizedlist>
  15. <listitem>
  16. <para>autoconf macros are distributed in the 'macros'
  17. subdirectory of the neon distribution. Use the NEON_LIBRARY
  18. macro from your configure.in to check for the presence of
  19. the neon library installed on the system. The macro adds an
  20. '--with-neon=...' argument to configure, which allows the
  21. user to specify a location for the library (the standard
  22. /usr and /usr/local directories are checked automatically
  23. without having to be specified).</para></listitem>
  24. <listitem><para>The 'src' directory of the neon package can be
  25. imported directly into your application, if you do not wish
  26. to add an external dependency. If you wish to bundle, use
  27. the NEON_BUNDLED macro to configure neon in your application:
  28. here, the neon sources are bundled in a directory called
  29. 'libneon':</para>
  30. <programlisting>NEON_BUNDLED(libneon, ...)</programlisting>
  31. <para>If your application supports builds where srcdir != builddir,
  32. you should use the NEON_VPATH_BUNDLED macro like this:</para>
  33. <programlisting>NEON_VPATH_BUNDLED(${srcdir}/libneon, libneon, ...)</programlisting>
  34. <para>If you use this macro, a '--with-included-neon' option
  35. will be added to the generated configure script. This
  36. allows the user to force the bundled neon to be used in the
  37. application, rather than any neon library found on the
  38. system. If you allow neon to be configured this way, you
  39. must also configure an XML parser. Use the NEON_XML_PARSER
  40. macro to do this.</para></listitem>
  41. <listitem><para>The final argument to the _BUNDLED macros is a
  42. set of actions which are executed if the bundled build *is*
  43. chosen (rather than an external neon which might have been
  44. found on the user's system). In here, use either the
  45. NEON_LIBTOOL_BUILD or NEON_NORMAL_BUILD macro to set up the
  46. neon Makefile appropriately: including adding the neon source
  47. directory to the recursive make.</para></listitem>
  48. </itemizedlist>
  49. <para>A full fragment might be:</para>
  50. <programlisting>NEON_BUNDLED(libneon, [
  51. NEON_NORMAL_BUILD
  52. NEON_XML_PARSER
  53. SUBDIRS="libneon $SUBDIRS"
  54. ])</programlisting>
  55. <para>This means the bundled neon source directory (called 'libneon')
  56. is used if no neon is found on the system, and the standard XML
  57. parser search is used.</para>
  58. </sect1>
  59. <sect1 id="compliance">
  60. <title>Standards compliance</title>
  61. <para>&neon; is intended to be compliant with the IETF and W3C
  62. standards which it implements, with a few exceptions due to
  63. practical necessity or interoperability issues. These
  64. exceptions are documented in this section.</para>
  65. <sect2><title>RFC 2518, HTTP Extensions for Distributed Authoring&mdash;WebDAV</title>
  66. <para>&neon; is deliberately not compliant with section
  67. 23.4.2, and treats property names as a (namespace-URI, name)
  68. pair. This is <ulink
  69. url="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999OctDec/0343.html">generally
  70. considered</ulink> to be correct behaviour by the WebDAV
  71. working group, and is likely to formally adopted in a future
  72. revision of the specification.</para></sect2>
  73. <sect2><title>RFC 2616, Hypertext Transfer Protocol&mdash;HTTP/1.1</title>
  74. <para>There is some confusion in this specification about the
  75. use of the <quote>identity</quote>
  76. <firstterm>transfer-coding</firstterm>. &neon; ignores the
  77. <literal>Transfer-Encoding</literal> response header if it
  78. contains only the (now deprecated) <quote>identity</quote>
  79. token, and will determine the response message length as if
  80. the header was not present. &neon; will give an error if a
  81. response includes a <literal>Transfer-Encoding</literal>
  82. header with a value other than <quote>identity</quote> or
  83. <quote>chunked</quote>.</para></sect2>
  84. <sect2>
  85. <title>RFC 2617, HTTP Authentication: Basic and Digest Access Authentication</title>
  86. <para>&neon; is not strictly compliant with the quoting rules
  87. given in the grammar for the <literal>Authorization</literal>
  88. header. The grammar requires that the <literal>qop</literal>
  89. and <literal>algorithm</literal> parameters are not quoted,
  90. however one widely deployed server implementation
  91. (Microsoft&reg; IIS 5) rejects the request if these parameters
  92. are not quoted. &neon; sends these parameters with
  93. quotes&mdash;this is not known to cause any problems with
  94. other server implementations.</para></sect2>
  95. <sect2>
  96. <title>Namespaces in XML</title>
  97. <para>The &neon; XML parser interface will accept and parse
  98. without error some XML documents which are well-formed
  99. according to the XML specification but do not conform to the
  100. "Namespaces in XML" specification <xref
  101. linkend="bib.xmlnames"/>. Specifically: the restrictions on
  102. the first character of the <literal>NCName</literal> rule are
  103. not all implemented; &neon; will allow any
  104. <literal>CombiningChar</literal>, <literal>Extender</literal>
  105. and some characters from the <literal>Digit</literal> class in
  106. this position.</para> </sect2>
  107. <!-- a few RFC2818/3280 issues: rules about when to cache
  108. sessions in the face of unclean shutdown are strict, neon is
  109. probably not compliant: document or fix. Likewise SSL
  110. shutdown issues in general. Cert hostname checks allow
  111. wildcard "*." syntax which is less than 2818 but more than
  112. 3280 requires. -->
  113. </sect1>