in reply to Re^4: Perl not playing video with vlc plugin
in thread Perl not playing video with vlc plugin

Let me recommend, once again, to use \r\n instead of \n to delimit the HTTP header lines when you print them.

Also, your Content-Length "header" is still malformed.

Replies are listed 'Best First'.
Re^6: Perl not playing video with vlc plugin
by awanti (Acolyte) on Dec 29, 2015 at 11:42 UTC
    Yeah i added and got this response
    Connection: close Content-Encoding: gzip Content-Length: 391 Content-Type: text/html; charset=iso-8859-1 Date: Tue, 29 Dec 2015 11:39:35 GMT Server: Apache/2.2.22 (Ubuntu) Vary: Accept-Encoding
    but i am getting the internal server error and in the error log it is writing
    Premature end of script headers: download.cgi

      Please run your script outside of the HTTP server and inspect its output. Your web server adds some headers and misinterprets some other headers. Most likely, your script does not output what you think it should.

        I added this line in starting
        print "Content-type: text/plain\n\n";
        The output is generated was
        Content-Type: application/x-vlc-plugin Cache-Control: public, must-revalidate, max-age=0 Pragma: no-cache Accept-Ranges: bytes Content-Length: 128959310 - 0 Content-Range: bytes 0'-'128959310'/'128959310 Content-Disposition: inline; filename="lua.mp4" Content-Transfer-Encoding: binary Connection: close
        I think the http headers are not giving expected output.