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

Whenever you see "internal server error", that just means that the real error is in the web server error log.

Why are you "not sure about this" anyway? When you run the program outside of the web server, Perl will show you the output of your program and also errors if it finds them. Do you know how to run your program outside of the web server?

Note that HTTP headers conventionally do not have whitespace before the line breaks. Instead of

print "Content-Type: text/html \r\n";

you should write:

print "Content-Type: text/html\r\n";

(without the space before the \r\n)

Replies are listed 'Best First'.
Re^12: Perl not playing video with vlc plugin
by awanti (Acolyte) on Dec 29, 2015 at 14:12 UTC
    yeah i executed the program in the terminal. here is the output of that
    Content-Type: text/html Content-Type: application/x-vlc-plugin Cache-Control: public, must-revalidate, max-age=0 Pragma: no-cache Accept-Ranges: bytes Content-Length: 128959310 Content-Range: bytes 0-128959310/128959310 Content-Disposition: inline; filename="lua.mp4" Content-Transfer-Encoding: binary Connection: close
    In the error log it is writing
    Premature end of script headers: download.cgi

      Your program does not finish the output of its headers correctly. You need an empty line between the headers and the start of the content. You could add the following line after you have printed all your headers and before you start printing the file content:

      print "\r\n"; # end of headers
        Now i am able to open the plugin the video is not playing