#37 Workaround for Samsung Smart TV 2012

Unstable (example)

New models of Samsung Smart TV violate RFC2396. As we can see in bug #3530232, the Request-Line contains a URI that is supposed to be an abs_path but in reality has a form of net_path. As a consequence, "//upnp/control/cds" is split into "upnp" as the authority and "/control/cds" as the abs_path. Later when MediaTomb tries to find the requested resource, it doesn't recognize "/control/cds" as something it can serve (as opposed to "/upnp/control/cds" which is a valid resource served by MediaTomb).

This patch strips excessive leading slashes if the scheme part was not found. Unfortunately this breaks the aforementioned RFC, specifically parsing URIs starting with a net_path will no longer work. I'm not sure if it actually impacts MediaTomb in any way. Are net_path URIs used in DLNA?

I will try to contact Samsung, see if they can fix their implementation.


<< < 1 2 (Page 2 of 2)
  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2012-10-16

    Mediatomb + Samsung TV 2012: Debian-way Squeeze. Testing on ES7507
    Add deb-src repo to /etc/apt/sources.list
    # apt-get update
    # cd /usr/src/
    # apt-get install dpkg-dev
    # apt-get install devscripts
    # apt-get install fakeroot
    # apt-get build-dep mediatomb
    # apt-get source -d mediatomb
    # ls -1
    # dpkg-source -x mediatomb_0.12.0~svn2018-6.1.dsc
    Download patch to /usr/src/mediatomb-0.12.0~svn2018/debian/patches/mediatomb-urifix.patch
    # echo mediatomb-urifix.patch >> /usr/src/mediatomb-0.12.0~svn2018/debian/patches/series
    # mcedit /usr/src/mediatomb-0.12.0~svn2018/debian/patches/mediatomb-urifix.patch
    Remove first line ("diff ... ")
    Change second line:
    --- mediatomb.orig/tombupnp/upnp/src/genlib/net/uri/uri.c 2012-06-06 23:01:22.000000000 +0200
    --- a/tombupnp/upnp/src/genlib/net/uri/uri.c
    Change three line:
    +++ mediatomb/tombupnp/upnp/src/genlib/net/uri/uri.c 2012-06-07 08:22:01.000000000 +0200
    +++ b/tombupnp/upnp/src/genlib/net/uri/uri.c
    # cd /usr/src/mediatomb-0.12.0~svn2018/
    # dch -i

    * Non-maintainer upload.
    * Samsung Smart TV 2012 fix by swiergot

    # dpkg-buildpackage -rfakeroot
    # ls -1
    # dpkg -i mediatomb-common_0.12.0~svn2018-6.2_i386.deb
    # dpkg -i mediatomb-daemon_0.12.0~svn2018-6.2_all.deb
    # dpkg -i mediatomb_0.12.0~svn2018-6.2_all.deb

    Last edit: Anonymous 2013-11-26
  • BlueH

    BlueH - 2012-10-17

    Hi taylor1477,
    I'm running it on FreBSD system. So such binary I'm able to provide you, but not Ubuntu distro. Sorry.

  • Leonid Podolny

    Leonid Podolny - 2012-11-24

    Great job, swiergot!!
    Prepared a patched Fedora RPM, works flawlessly.
    Two questions:
    a) will this patch go into official mediatomb sources or will I need to patch the RPM again when new version of mediatomb is released?
    b) did you hear back from samsung support?

  • Maxim

    Maxim - 2012-12-26

    Awesome! Works perfectly on my Sheevaplug!

  • Jin

    Jin - 2013-12-25
    • status: open --> closed-accepted
    • assigned_to: Jin
    • Group: --> Unstable (example)
  • Jin

    Jin - 2013-12-25

    Hope it does not affect any other devices, applied.

<< < 1 2 (Page 2 of 2)

Log in to post a comment.