# Add Stream with user agent

**URL:** <https://community.wowza.com/t/add-stream-with-user-agent/54359>\
**Category:** Wowza Streaming Engine\
**Created:** [December 20, 2019, 3:26pm UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359 "2019-12-20T15:26:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex\_molass](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@alex\_molass](https://community.wowza.com/u/alex_molass)\
**Post date:** [December 20, 2019, 3:26pm UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359/1 "2019-12-20T15:26:13Z")

</div>

Hello Friends,

I want to add Stream File from hls URL (m3u8) but I can not find a place to put user agent.

How to add it because the link does not work without user agent

in vlc player i add on options :http-user-agent=45445msmn5

It works well

thanks

---

<div class="post-metadata">

**Author:** ![alex\_molass](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@alex\_molass](https://community.wowza.com/u/alex_molass)\
**Post date:** [December 22, 2019, 3:40am UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359/2 "2019-12-22T03:40:56Z")

</div>

Is there anyone here to help???

---

<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:** [December 23, 2019, 7:30pm UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359/3 "2019-12-23T19:30:35Z")

</div>

Checking for you now and will post very soon

---

<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:** [December 23, 2019, 7:41pm UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359/4 "2019-12-23T19:41:12Z")

</div>

There is a Java level property called http.agent which can be defined within the JVM on instance startup. Is this what you are referring to?

http.agent (default: “Java/”)

- Defines the string sent in the User-Agent request header in http requests. Note that the string “Java/” will be appended to the one provided in the property (e.g. if -Dhttp.agent=”foobar” is used, the User-Agent header will contain “foobar Java/1.5.0” if the version of the VM is 1.5.0). This property is checked only once at startup.

[https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html](https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html)

It would be set via conf/Tune.xml as a VMOption, e.g.

The example I provided whereby you can set the Java built-in property http.agent on Wowza startup is where you would change what user agent is used when making HTTP requests (for example, when pulling in an applehls HLS MediaCaster stream).

As noted, the Java version number will always be appended to any custom http.agent setting. This is also a global setting for the lifetime of the Wowza instance and **_cannot be set at the application or stream layer._**

---

<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:** [December 23, 2019, 7:53pm UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359/5 "2019-12-23T19:53:59Z")

</div>

We use the user agent as set in the JVM when Wowza starts up @alex molass. You can change this via the http.agent property, for example in conf/Tune.xml by adding the following VMOption

-Dhttp.agent=myagent

Note however that the JVM does not allow you to completely overwrite the user agent. Instead it will prepend it to the existing value.

Again, it is explained here and I hope this helps:

[https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html](https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html)

---

<div class="post-metadata">

**Author:** ![Art\_MK](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Art\_MK](https://community.wowza.com/u/Art_MK)\
**Post date:** [April 18, 2020, 10:29pm UTC](https://community.wowza.com/t/add-stream-with-user-agent/54359/6 "2020-04-18T22:29:02Z")

</div>

hi, did you solve this issue. I have the same issue, adding -Dhttp.agent=myagent in conf/Tune.xml not working for me
