###############################################################################
#                                                                             #
#   Copyright 2005 University of Cambridge Computer Laboratory.               #
#                                                                             #
#   This file is part of Nprobe.                                              #
#                                                                             #
#   Nprobe is free software; you can redistribute it and/or modify            #
#   it under the terms of the GNU General Public License as published by      #
#   the Free Software Foundation; either version 2 of the License, or         #
#   (at your option) any later version.                                       #
#                                                                             #
#   Nprobe is distributed in the hope that it will be useful,                 #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of            #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             #
#   GNU General Public License for more details.                              #
#                                                                             #
#   You should have received a copy of the GNU General Public License         #
#   along with Nprobe; if not, write to the Free Software                     #
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA #
#                                                                             #
###############################################################################


###############################################################################
##
## HTTP_FIELDS
##
## LIST OF HTTP HEADER FIELDS RECOGNISED BY HTTP MODULE
##  - PROCESSED TO GENERATE FIELD TYPE PARSING CODE
##
###############################################################################

## FIELDS ARE:
##
##	1 Http field identifier
##	2 Name of field value-extracting function
##      3/4 Where field value is extracted as an alphanumeric copy the (char *)
##         destination of the copy and the (unsigned char *) address where the 
##         8-bit string length is to be recorded.
##
##         Note: that where the field may occur in both request and response 
##         headers a trigraph based upon which is required.
##
##         In the case of field-specific extraction funs the fn itself knows
##         where to stash the extracted value.

## DIRECTION DIRECTIVES:
##
##      Fields are grouped according to the originating host and specified by
##        direction directive lines of the form "way = xxx
##

###############################################################################
##
###############################################################################
##
## Client and Server
##

way = client/server

Content-Type  get_content_type 
Content-Length  get_content_length 
Connection  get_connection_type 
Transfer-Encoding  get_encoding_type 
Via  get_hdrline way==SERVER?HTTP_SVIASTR:HTTP_CVIASTR way==SERVER?&HTTP_SVIASTRLEN:&HTTP_CVIASTRLEN

##
## Server Only
##

way=server

Proxy-Connection  get_connection_type
Trailer  get_trailer_fields
Location  get_location
Refresh  get_refresh
Server  get_hdrline HTTP_SERVERSTR &HTTP_SERVERSTRLEN



##
## Client Only
##

way=client

Referer get_referer
TE get_te_perm
Host get_hdrline  HTTP_HOSTSTR &HTTP_HOSTSTRLEN
User-Agent get_hdrline HTTP_UAGENTSTR &HTTP_UAGENTSTRLEN
