#37 Workaround for Samsung Smart TV 2012

Unstable (example)
closed-accepted
Jin
None
5
2013-12-25
2012-06-07
Anonymous
No

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.

Discussion

1 2 > >> (Page 1 of 2)
  • Brent
    Brent
    2012-06-28

    Can you please explain how to use the "mediatomb-urifix.patch"? I'm not sure how to incorporate this into my mediatomb setup.

    Thanks

     
  • BlueH
    BlueH
    2012-06-30

    Good job swiergot !! I've just patched my FreeNAS 8.0.4 and it works perfectly.
    To breasthead: go to the location of uri.c within mediatomb source codes and just apply the patch: $> patch < <patch_file>
    Than just continue: $> make install

     
  • Brent
    Brent
    2012-07-02

    Thanks dflegl,
    However, I'm running a static build of mediatomb 0.12.0 SVN 2017 (compiled by another) on a NAS box, as such I don't have the source ... nor the development tools needed to compile that way. I trust there is no way to patch via edits to the config.xml?

    Thanks

     
  • BlueH
    BlueH
    2012-07-02

    You need to compile the Mediatomb personally not to rely on prepared packages. So you need to download the whole sources of Mediatomb, patch the mentioned file and finaly finalize the installation with magic keyword $> make install. It's simple.
    e.g. for FreeNAS I did.
    0) Download and install FreeBSD 8.2 to the Virtual Box
    1) go the the port: $> cd /usr/ports/net/mediatomb
    2) download and stop before building: $> make patch
    3) patch the uri.c itself as mentioned before
    4) finalize the installation $> make install
    5) copy the compiled binary "mediatomb" to the flashdisk with FreeNAS

    A bit long but simple.

     
  • BlueH
    BlueH
    2012-07-02

    btw: I'm using the same version used on FreeNAS 8.0.4 and currently building such NAS server. If you'd need I can provide you the compiled binary. It depends on you.
    This approach I've verified with Samsung UE40ES7000.

     
  • Brent
    Brent
    2012-07-03

    Dflegl,

    Well if you can provide the patched binary, in a static build (ie with all dependable libraries bundled) that would be great!!
    I myself am running it on a fun-plug'd dlink323 nas, which as I said currently doesn't have any development environment. I think I can get everything I need to compile on there (after all the guy who's build I'm currently using did it), but I'm not too confident that I won't kill everything else I have going on the box!

    Thanks

     
  • Spencer Oliver
    Spencer Oliver
    2012-07-25

    Thanks, this patch solves problems i was having with an ES6300.

     
  • Hi,

    Just found this thread after submitting my own patch to the bug... Doh!

    I don't use sourceforge.

    Anyway, my patch should workaround Samsungs broken client without affecting ABSOLUTE URIs, I only remove the additional leading slash if it was found not to be ABSOLUTE.

     
  • Schneider
    Schneider
    2012-10-10

    Hello, I like mediatomb. But I have problem describe here.
    I try made patched mediatomb 0.12.1 for ubuntu 12. But get some errors at the "make" procedure.

    ./configure
    .
    .
    .
    CONFIGURATION SUMMARY ----

    sqlite3 : yes
    mysql : yes
    libjs : yes
    libmagic : yes
    inotify : yes
    libexif : yes
    id3lib : disabled
    taglib : yes
    libmp4v2 : yes
    ffmpeg : yes
    ffmpegthumbnailer : yes
    lastfmlib : missing
    external transcoding : yes
    curl : yes
    YouTube : yes
    libextractor : disabled
    db-autocreate : yes

    make ....
    ../src/zmm/object.h:51:32: ошибка: декларация «operator new» как не-функции
    ../src/zmm/object.h:51:27: ошибка: expected «;» at end of member declaration
    ../src/zmm/object.h:51:39: ошибка: expected «)» before «size»
    In file included from ../src/scripting/playlist_parser_script.h:36:0,
    from ../src/content_manager.h:46,
    from ../src/autoscan.cc:38:
    ../src/scripting/script.h:69:5: ошибка: «JSScript» не является именем типа
    ../src/scripting/script.h:70:5: ошибка: «JSScript» не является именем типа
    ../src/scripting/script.h:118:5: ошибка: «JSScript» не является именем типа
    ../src/scripting/script.h:119:19: ошибка: «JSScript» не был декларирован
    make[2]: *** [libmediatomb_a-autoscan.o] Ошибка 1

    How I can fix it. Or please make the static binary with URI-patch.
    Thx

     
1 2 > >> (Page 1 of 2)