# Wowza responds 200 to invalid URL - should respond 404

**URL:** <https://community.wowza.com/t/wowza-responds-200-to-invalid-url-should-respond-404/92722>\
**Category:** Wowza Streaming Engine\
**Created:** [January 20, 2021, 2:42pm UTC](https://community.wowza.com/t/wowza-responds-200-to-invalid-url-should-respond-404/92722 "2021-01-20T14:42:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oto\_Maly](https://avatars.discourse-cdn.com/v4/letter/o/a183cd/32.png) [@Oto\_Maly](https://community.wowza.com/u/Oto_Maly)\
**Post date:** [January 20, 2021, 2:42pm UTC](https://community.wowza.com/t/wowza-responds-200-to-invalid-url-should-respond-404/92722/1 "2021-01-20T14:42:57Z")

</div>

Hi, I am trying to find out, how to make Wowza respond 404 to not found content.  
E.g.  
On my server I have application live01 and stream CT1\_p1.stream.  
when I try the following request I get response 200  
e.g. [http://172.16.219.210:1935/live01/CT1\_p1.stream/index.m3u8](http://172.16.219.210:1935/live01/CT1_p1.stream/index.m3u8)

```
[root@test01 ~]# curl -sw '\n%{http_code}\n' http://172.16.219.210:1935/live01/CT1_p1.stream/index.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=541289,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=480x270
chunklist.m3u8
200

```

If I try something else, an incomplete URL or wrong application name it always returns 200.  
e.g.  
[http://172.16.219.210:1935/live01/CT1\_p1.stream/index](http://172.16.219.210:1935/live01/CT1_p1.stream/index)  
[http://172.16.219.210:1935/test\_url](http://172.16.219.210:1935/test_url)  
[http://172.16.219.210:1935/live01/CT1\_p1.stream/random\_tex](http://172.16.219.210:1935/live01/CT1_p1.stream/random_tex)

```
[root@test01 ~]# curl -sw '\n%{http_code}\n' http://172.16.219.210:1935/live01/CT1_p1.stream/index
<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>
200

```

only if I try some url that ends with m3u8 or mpd it returns 404  
e.g.  
[http://172.16.219.210:1935/live01/CT1\_p1.m3u8](http://172.16.219.210:1935/live01/CT1_p1.m3u8)  
[http://172.16.219.210:1935/test\_url.mpd](http://172.16.219.210:1935/test_url.mpd)  
[http://172.16.219.210:1935/live01/random.stream/random\_text.m3u8](http://172.16.219.210:1935/live01/random.stream/random_text.m3u8)

```
[root@test01 ~]# curl -sw '\n%{http_code}\n' http://172.16.219.210:1935/live01/CT1_p1.m3u8
404
[root@test01 ~]# curl -sw '\n%{http_code}\n' http://172.16.219.210:1935/test_url.mpd
404
[root@test01 ~]# curl -sw '\n%{http_code}\n' http://172.16.219.210:1935/live01/random.stream/random_text.m3u8
404

```

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.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [January 20, 2021, 9:13pm UTC](https://community.wowza.com/t/wowza-responds-200-to-invalid-url-should-respond-404/92722/2 "2021-01-20T21:13:47Z")

</div>

> [@Oto\_Maly](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [January 21, 2021, 12:43am UTC](https://community.wowza.com/t/wowza-responds-200-to-invalid-url-should-respond-404/92722/3 "2021-01-21T00:43:59Z")

</div>

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](https://www.wowza.com/docs/wowza-streaming-engine-4-8-8-01-release-notes)

- 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.

---

<div class="post-metadata">

**Author:** ![Oto\_Maly](https://avatars.discourse-cdn.com/v4/letter/o/a183cd/32.png) [@Oto\_Maly](https://community.wowza.com/u/Oto_Maly)\
**Post date:** [January 28, 2021, 7:37am UTC](https://community.wowza.com/t/wowza-responds-200-to-invalid-url-should-respond-404/92722/4 "2021-01-28T07:37:46Z")

</div>

Hello,  
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?  
Thanks  
Regards  
Oto
