HTTP provider for setting a custom HTTP response code
Set a default custom HTTP response code
Updated on 07/16/2026 7:28 am PDT
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.
Copy
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))
return;
int responseCode = this.properties.getPropertyInt("responseCode", 200);
resp.setResponseCode(responseCode);
}
}
Configuration [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#configuration "Copy to clipboard"/index.html)
Open the Wowza Streaming Engine VHost.xml configuration file [ install-dir]/conf/VHost.xml in a text editor.
In VHost.xml, locate the default streaming hostport (
/ / Default Streaming ).In this section of the XML file, in the list of HTTP providers (
... ), locate the following HTTP provider configuration section (this is the default HTTP provider):
Copy
<HTTPProvider>
<BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass>
<RequestFilters>*ServerVersion</RequestFilters>
<AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>
- Replace this HTTP provider with the following:
Copy
<HTTPProvider>
<BaseClass>com.wowza.wms.example.HttpCustomResponseCode</BaseClass>
<RequestFilters>*</RequestFilters>
<AuthenticationMethod>none</AuthenticationMethod>
<Properties>
<Property>
<Name>responseCode</Name>
<Value>404</Value>
</Property>
</Properties>
</HTTPProvider>
You can set the responseCode property value to any valid HTTP response status code.
- Save the VHost.xml file, and then restart Wowza Streaming Engine.
Was this article helpful?
[Helpful](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode# "Helpful"/index.html)
Thank you for your feedback!
300 characters remaining
Name
reCAPTCHA
Recaptcha requires verification.
I'm not a robot
reCAPTCHA
[Submit](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode# "Submit comment"/index.html)
Thank you for providing feedback to help us improve our documentation!
Popular Video Topics [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#popular-video-topics "Copy to clipboard"/index.html)
- The Future of Video Tech
- Streaming Starter Guide
- Live Event Streaming Guide
- Interactive Streaming Guide
- Streaming Protocols
- Transcoding
- Low Latency
- Security
Video Resources [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#video-resources "Copy to clipboard"/index.html)
Partners [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#partners "Copy to clipboard"/index.html)
Company [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#company "Copy to clipboard"/index.html)
Stay Connected [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#stay-connected "Copy to clipboard"/index.html)
Stay Up to Date with the Blog [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode#stay-up-to-date-with-the-blog "Copy to clipboard"/index.html)
X - Form Filled Type
© 2007–2025 Wowza Media Systems™, LLC. All rights reserved. Security & Privacy Policy | Legal | System Status
reCAPTCHA