Page 1 of 1

Wrong User Agent used for Thumbnail retrieval

PostPosted: Fri Apr 26, 2013 9:10 pm
by jhb50
Recently Ilive began checking the user agent on thumbnail requests, however Serviio uses the User-Agent: Java/1.7.0_04 when accessing thumbnails and so they fail.
  Code:
2013-04-26 10:49:36,920 DEBUG [OnlineLibraryManager] Thumbnail http://static.ilive.to/images/channels/gz3d47y2phxi78x_snapshot.jpg not in cache yet, loading it
2013-04-26 10:49:37,040 WARN  [FeedUpdaterThread] An error occured while retrieving thumbnail, will remove it from the item and will continue
org.serviio.library.online.CannotRetrieveThumbnailException: Failed to download thumbnail http://static.ilive.to/images/channels/gz3d47y2phxi78x_snapshot.jpg.
   at org.serviio.library.online.OnlineLibraryManager.findThumbnail(OnlineLibraryManager.java:266)
   at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:107)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://static.ilive.to/images/channels/gz3d47y2phxi78x_snapshot.jpg
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
   at org.serviio.util.HttpClient.retrieveBinaryFileFromURL(HttpClient.java:72)
   at org.serviio.library.online.OnlineLibraryManager.findThumbnail(OnlineLibraryManager.java:258)


Here is the wireshark for the serviio request:
GET /images/channels/i6ultf8mp64grlx_snapshot.jpg HTTP/1.1
User-Agent: Java/1.7.0_04
Host: static.ilive.to
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
HTTP/1.1 403 Forbidden
Server: cloudflare-nginx
Date: Fri, 26 Apr 2013 15:21:01 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive

and this is the wireshark for a successful browser request:
GET /images/channels/9ft15bx7kc229en_snapshot.jpg HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
Accept-Encoding: gzip, deflate
Host: static.ilive.to
Connection: Keep-Alive
HTTP/1.1 304 Not Modified
Server: cloudflare-nginx
Date: Fri, 26 Apr 2013 15:33:45 GMT
Connection: keep-alive


I need to be able to provide parameters for thumbnail accesses.

Re: Wrong User Agent used for Thumbnail retrieval

PostPosted: Fri Apr 26, 2013 9:59 pm
by zip
ok, create a ticket for it please. There is UserAgent property for the url container, but it's not used for thumbnail retrieval atm

Re: Wrong User Agent used for Thumbnail retrieval

PostPosted: Wed May 29, 2013 2:57 pm
by jhb50
Also now required to retrieve hd-trailers.net thumbnails. See new details and proof in ticket https://bitbucket.org/xnejp03/serviio/i ... -thumbnail