Wowza Community

Wowza responds 200 to invalid URL - should respond 404

Hi, I am trying to find out, how to make Wowza respond 404 to not found content.
On my server I have application live01 and stream
when I try the following request I get response 200

[root@test01 ~]# curl -sw '\n%{http_code}\n'

If I try something else, an incomplete URL or wrong application name it always returns 200.

[root@test01 ~]# curl -sw '\n%{http_code}\n'
<html><head><title>Wowza Streaming Engine 4 Perpetual Pro Edition 4.8.0 build20200213142111</title></head><body>Wowza Streaming Engine 4 Perpetual Pro Edition 4.8.0 build20200213142111</body></html>

only if I try some url that ends with m3u8 or mpd it returns 404

[root@test01 ~]# curl -sw '\n%{http_code}\n'
[root@test01 ~]# curl -sw '\n%{http_code}\n'
[root@test01 ~]# curl -sw '\n%{http_code}\n'

Can you please advice how to make Wowza respond with 404 in case the URL is invalid?
Because a response like "Wowza Streaming Engine 4 … " only gives the client who tried the invalid request information/details about the server. And we consider this wrong behavior.

Let me check with the Engine team for you. Be back when I have some info for you.

Ok, thanks for your patience @Oto_Maly. I was able confirm that the engineers agree with you - this is behavior you would not want so they made the changes to fix it in Engine version 4.8.8.

Please see the following in the release notes for 4.8.8

  • Removed the Server header from the default headers returned with all HTTP requests.

  • Changed the default value of the property for the HTTPServerVersion HTTP Providers in VHost.xml to *ServerVersion.

if the you copy or mimic the default VHost.xml file from a 4.8.8+ installation for your <RequestFilters> you should be set.

Please make sure you check out the breaking changes in 4.8.0, and any version since then and that your java is updated to 9 or higher or Engine will not work for you. It looks like that is the version you are using, so I’m assuming you already knew this and did that.

If you are experience any issues at all with upgrading to 4.8.8, please submit a ticket so that an engineer can make sure all is working correctly for you. Thanks.

thanks for the response.
I have one additional comment thought.
The suggested change will still give repsonse code 200.
Which in its definition is correct response.
But since the content is not found on the specific URL, it should not give a correct response code 200, but instead the reponse code should be 404.
Than the client application can properly process the response.
Would you not agree?