Shell write CGI, post, return annex, download tools (such as thunder) cannot obt

The following code:
<form id=download name="formDownload" method=post action="cgi-bin/firmware.cgi?download_main">
<td><input class=button type=submit value="Download"></td>
</form>

firmware.cgi,Part of the code:
...
sed "s/$/$CR/" <<EOF
$SERVER_PROTOCOL 200 OK
Content-disposition:attachment; filename="$fw_name";
Pragma: no-cache
Cache-Control: no-cache, must-revalidate

EOF
dd if=/dev/mtdblock$devfnum bs="$fw_size"c count=1c
...

Click Download, "save as" can obtain the attachment, such as thunder, get file address firmware.cgi

How to solve?

Started by Arnold at November 08, 2016 - 9:36 AM

$Fw_name has a value.?

Posted by Grover at November 20, 2016 - 10:06 AM

Yes, we have

Posted by Arnold at December 03, 2016 - 10:50 AM

up

Posted by Michell at December 09, 2016 - 11:17 AM

I for the shell program, to be utterly ignorant of, is to see growth drop please master informal words thanks in advance

Posted by Blake at December 21, 2016 - 12:02 PM

To do so, you add a blank line in the HTTP 200 OK back, then access this CGI, and then paste it to download things, so that you can see the HTTP actual output is what.

Posted by Grover at January 05, 2017 - 12:28 PM

The reply to 2009-11-05 09:20:24 was a moderator to delete

Posted by Osborn at January 05, 2017 - 1:55 PM

The download time for the task is not to access your server, nature is not only in the beginning of the file name, when the task can be, generally will automatically change into your name

Posted by Robin at January 07, 2017 - 1:28 PM

Do not understand, learning

Posted by Hebe at January 13, 2017 - 1:31 PM