Host HTTP Requests Processing
155
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
HTTP Server
9.7.1 Metadata (TLVs) Description
Each HTTP request consists of two parts: the HTTP headers, and HTTP body (which is optional). The
headers are standard fields defined by the HTTP RFCs and set various parameters of the HTTP
transaction. To allow easy parsing of the headers, they are converted to TLV representation. Each TLV
has the structure listed in
(1)
The only exception is the HTTP Content Length field, which is automatically converted to an integer.
Table 9-22. TLV Structure
Size
1 Byte
2 Bytes
n Bytes
Name
Metadata Type
Length
Value
Description
A unique number identifying
the HTTP header, see
Size in bytes of the entire TLV
including the Length and Type
fields.
Raw value of the HTTP header
copied directly from the HTTP
request without line termination
(\r or \n characters).
(1)
lists the metadata types.
Table 9-23. HTTP Metadata Types
Metadata Type
HTTP Header Name
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_TYPE
Content-Type
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_LEN
Content-Length
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_LOCATION
Location
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_SERVER
Server
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_USER_AGENT
User-Agent
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_COOKIE
Cookie
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_SET_COOKIE
Set-Cookie
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_UPGRADE
Upgrade
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_REFERER
Referer
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_ACCEPT
Accept
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_ENCODING
Content-Encoding
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_DISPOSITION
Content-Disposition
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONNECTION
Connection
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_ETAG
Etag
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_DATE
Date
SL_NETAPP_REQUEST_METADATA_TYPE_HEADER_HOST
Host
SL_NETAPP_REQUEST_METADATA_TYPE_ACCEPT_ENCODING
Accept-Encoding
SL_NETAPP_REQUEST_METADATA_TYPE_ACCEPT_LANGUAGE
Accept-Language
SL_NETAPP_REQUEST_METADATA_TYPE_CONTENT_LANGUAGE
Content-Language
SL_NETAPP_REQUEST_METADATA_TYPE_ORIGIN
Origin
SL_NETAPP_REQUEST_METADATA_TYPE_ORIGIN_CONTROL_ACCESS
Access-Control-Allow-Origin
All HTTP headers not present in
are skipped. Additionally, the metadata types listed in
are generated internally by the HTTP server to provide more information on the HTTP request.
Table 9-24. Internal Metadata Types
Metadata Type
Description
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_VERSION
Version field of the HTTP request
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_REQUEST_URI
URI string of the HTTP request
SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_QUERY_STRING
Query string of the HTTP request