Sitemap Image url gotcha

I thought I would post this little tidbit as it doesn’t seem to have come up here before.

We have an elderly CCTV system that offers the ability to grab still snapshots via a URL e.g.
mycctv.avers.com.tw/mobile/channel09.jpg
You can put just that in browser address bar and get a picture, simple.
So I tried this sitemap line

Image label="Cam9" url="mycctv.avers.com.tw/mobile/channel09.jpg" refresh=15000

and it did not work, this error in OH log

2017-05-25 10:33:08.921 [WARN ] [e.jetty.servlet.ServletHandler] - /proxy
java.lang.IllegalStateException: unsupported protocol: 'mycctv.avers.com.tw'
	at org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(Protocol.java:149) ~

Eventually I tried

Image label="Cam9" url="http://mycctv.avers.com.tw/mobile/channel09.jpg" refresh=15000

and it works. I guess OH proxy needs the http clue
(even though a browser not only doesn’t need it, it throws that part away from the address bar when it gets the picture response)

2 Likes

The browser actually does need it and does use it. It just hides it from you. When you click on the address bar to copy the link I suspect the http:// will be readded to the url string.