Set a default custom HTTP response code using the Wowza Streaming Engine Java API

This HTTP provider for Wowza Streaming Engine™ media server software (HttpCustomResponseCode) replaces the default HTTP provider and returns a custom HTTP response code for requests that aren't handled previously. Only the response headers are returned. No content or HTTP body is returned.

Note: The default HTTP provider normally returns the Wowza Streaming Engine software version.
package com.wowza.wms.example;

import com.wowza.wms.http.*;
import com.wowza.wms.vhost.*;

public class HttpCustomResponseCode extends HTTPProvider2Base

	public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp)
		if (!doHTTPAuthentication(vhost, req, resp))
		int responseCode ="responseCode", 200);


  1. Open the Wowza Streaming Engine VHost.xml configuration file [install-dir]/conf/VHost.xml in a text editor.
  2. In VHost.xml, locate the default streaming hostport (<HostPortList>/<HostPort>/<Name>Default Streaming</Name>).
  3. In this section of the XML file, in the list of HTTP providers (<HTTPProviders>...</HTTPProviders>), locate the following HTTP provider configuration section (this is the default HTTP provider):
  4. Replace this HTTP provider with the following:

    You can set the responseCode property value to any valid HTTP response status code.
  5. Save the VHost.xml file, and then restart Wowza Streaming Engine.