Configure date headers for HTTP responses from HTTP providers in Wowza Streaming Engine

By default, Wowza Streaming Engine™ media server software doesn't enable date headers for HTTP responses from HTTP providers. In some cases, it's useful to have a date header to provide synchronization across services.

Note: This article applies to Wowza Streaming Engine 4.6.0.02 and later.

Contents


About date headers Configuration options

About date headers


Date headers for HTTP responses can be configured globally for the Wowza Streaming Engine instance or for individual HTTP providers. For more information, see Configuration options.

To enable and configure date headers for HTTP responses, you must add one or more of the following properties:

Enable date headers

To enable date headers in HTTP responses from HTTP providers, add the dateHeaderEnable property:

<Property>
    <Name>dateHeaderEnable</Name>
    <Value>true</Value>
    <Type>Boolean</Type>
</Property>

The default value is false, which disables date headers for HTTP responses. If you set the value to true, date headers are enabled.

Specify a date headers format

To specify a format for the date headers in HTTP responses from HTTP providers, add the dateHeaderFormat property:

<Property>
    <Name>dateHeaderFormat</Name>
    <Value>[format]</Value>
    <Type>string</Type>
</Property>

Where [format] is replaced with a date and time pattern. For example, using the value EEE, d MMM yyyy HH:mm:ss would return the day of the week, date, and time in the following format: Wed, 4 Jul 2001 12:08:56. For more information about valid formats, see Simple Date Formats.

Specify a date headers zone

To specify a zone for the date headers in HTTP responses from HTTP providers, add the dateHeaderZone property:

<Property>
    <Name>dateHeaderZone</Name>
    <Value>GMT</Value>
    <Type>string</Type>
</Property>

Time zones are interpreted as text if they have names, such the default value of GMT. Optionally, you can append the offset from UTC using the following structure: <zone> <sign><hours>:<minutes>. For example, EST -05:00.

Specify a date headers locale

To specify a locale for the date headers in HTTP responses from HTTP providers, add the dateHeaderLocale property:

<Property>
    <Name>dateHeaderLocale</Name>
    <Value>en_US</Value>
    <Type>string</Type>
</Property>

The locale ID for any of the Enabled Locales for java.util and java.text Functionality can be specified. For example, en_US is the locale ID for the English language and United States country. By default, the server's configured language and country settings are used. (The server's language and country settings are visible in the access log file when Wowza Streaming Engine starts.)

Configuration options


The date headers can be configured globally for all HTTP providers or for individual HTTP providers.

Configure a single HTTP provider

  1. Open the [install-dir]/conf/VHost.xml file in a text editor and add the date header properties to the <HTTPProvider><Properties> section. The following example enables the date header and specifies a specific format and locale:
     
    <HTTPProvider>
        <BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass>
        <RequestFilters>*ServerVersion</RequestFilters>
        <AuthenticationMethod>none</AuthenticationMethod>
        <Properties>
            <Property>
                <Name>dateHeaderEnable</Name>
                <Value>true</Value>
                <Type>Boolean</Type>
            </Property>
            <Property>
                <Name>dateHeaderFormat</Name>
                <Value>EEE, dd MMM yyyy HH:mm:ss z</Value>
                <Type>String</Type>
            </Property>
            <Property>
                <Name>dateHeaderLocale</Name>
                <Value>en_US</Value>
                <Type>String</Type>
            </Property>
        </Properties>
    </HTTPProvider>
  2. Restart the Wowza Streaming Engine server for your changes to take effect.

Configure date headers globally

  1. To configure the date header globally for all HTTP providers associated with the VHost, open the [install-dir]/conf/VHost.xml file in a text editor and add the date header properties to the <Properties> section at the bottom of the file.
     
    Note: You can override these settings for a specific HTTP provider by editing the <HTTPProvider> section in the [install-dir]/conf/VHost.xml file. See Example HTTP Provider Configuration.

    The following example adds these properties to the VHost.xml file:

    <Property>
        <Name>dateHeaderEnable</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
    <Property>
        <Name>dateHeaderFormat</Name>
        <Value>EEE, dd MMM yyyy HH:mm:ss z</Value>
        <Type>String</Type>
    </Property>
    <Property>
        <Name>dateHeaderLocale</Name>
        <Value>en_US</Value>
        <Type>String</Type>
    </Property>
  2. Restart the Wowza Streaming Engine server for your changes to take effect.