Menu

#49 SVN: Mediatomb always flags file as chunked output

closed-fixed
Jin
UPnP (10)
1
2010-04-06
2009-04-29
No

I recently upgraded from 0.11.0 to 0.12.0 for testing. After upgrading streaming MP4 files to my PS3 no longer worked.
Trying to figure out what's happening I noticed that the header mediatomb was sending out had changed.

HTTP/1.1 200 OK
TRANSFER-ENCODING: chunked
CONTENT-TYPE: video/mp4
DATE: Wed, 29 Apr 2009 10:51:15 GMT
LAST-MODIFIED: Sat, 22 Dec 2007 18:10:44 GMT
SERVER: Linux/2.6.29.2, UPnP/1.0, MediaTomb/0.12.0
CONNECTION: close
Content-Disposition: attachment; filename="Cambridge - Parcour.mp4"
Accept-Ranges: bytes

Looking at the code I noticed that force_chunked never got initialised properly in that code-path and with -O2 optimisations turns out to be "1" after a few requests.
The following patch fixes this, but I do not know if this is the proper location in the code to do that.

Index: tombupnp/upnp/src/genlib/net/http/webserver.c

--- tombupnp/upnp/src/genlib/net/http/webserver.c (revision 2018)
+++ tombupnp/upnp/src/genlib/net/http/webserver.c (working copy)
@@ -1265,6 +1265,7 @@
request_doc = NULL;
finfo.content_type = NULL;
finfo.http_header = NULL;
+ finfo.force_chunked = FALSE;
*Fp = NULL;
//membuffer_init( &content_type );
alias_grabbed = FALSE;

Discussion

  • Mark Guptill

    Mark Guptill - 2009-07-02

    this patch works for me

     
  • Jin

    Jin - 2009-12-20
    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Jin

    Jin - 2009-12-20

    Good catch, thanks! Fixed in revision 2029.

     
  • Jin

    Jin - 2010-04-06
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.