expires_parser.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <section id="expires_parser" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <sectioninfo>
  6. <revhistory>
  7. <revision>
  8. <revnumber>$Revision$</revnumber>
  9. <date>$Date$</date>
  10. </revision>
  11. </revhistory>
  12. </sectioninfo>
  13. <title>Expires HF Body Parser</title>
  14. <para>
  15. The parser parses body of Expires header field. The body is very
  16. simple, it consists of number only. so the parser only removes any
  17. leading tabs and spaces and converts the number from string to
  18. integer. That's it.
  19. </para>
  20. <para>
  21. The parser can be found in file <filename>parse_expires.c</filename>
  22. under <filename>parser</filename> subdirectory. Main function is
  23. <function>parse_expires</function>. The function is not called
  24. automatically when an Expires header field was found. It is up to you
  25. to call the function if you need the body to be parsed.
  26. </para>
  27. <para>
  28. The function creates a new instance of
  29. <structname>exp_body_t</structname> structure and calls the parser. If
  30. everything went OK, pointer to the newly created structure will be
  31. saved in <structfield>parsed</structfield> field of the
  32. <structname>hdr_field</structname> structure representing the parsed
  33. header field.
  34. </para>
  35. <xi:include href="exp_body_t.xml"/>
  36. </section>