Plugin check-mime-1 Spec

 

Overview

This plugin is composed of three parts:

  1. Test the functions in TSMimeHdr* and TSMimeParser* categories.
  2. Test the functions in TSHttpHdr* and TSUrl* categories.
  3. Call TSHttpHdrReasonLookup and print out the default reason for each status.

Feature Description

In TSPluginInit(), the plugin calls three functions:

mimeHdrHandler() parses a MIME header and prints out the parsed header. It clones the parsed header the prints out the cloned header. Then it clones the Via field and copies the Content-Length field in the cloned header and prints out the modified cloned header. Finally, it does the clean up.

httpHdrHandler() parses a MIME header, parsed a URL and set the parsed URL to the parsed HTTP header and prints out the modified HTTP header. It then clones the HTTP header and the URL, and prints out the cloned URL.

httpHdrReasonHandler() calls TSHttpHdrReasonLookup for each status and prints out the default reason.