From: Mark on 8 Jul 2010 04:35 Hello, I need to implement a firmware upgrade from user-level application on an embedded system. Currently it's done by means of embedded web server 'httpd' with modifications by a chip maker, whose hardware we use. So below is request sequence sent to a server by a web browser: POST /upgrade.cgi HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, */* Referer: http://192.168.2.1/firmware.asp Accept-Language: en Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.2) Host: 192.168.2.1 Content-Length: 341 Connection: Keep-Alive Cache-Control: no-cache Authorization: Basic OmFkbWlu -----------------------------7da271f502f4 Content-Disposition: form-data; name="page" firmware.asp -----------------------------7da271f502f4 Content-Disposition: form-data; name="file"; filename="C:\test.txt" Content-Type: text/plain test file -----------------------------7da271f502f4-- 'test.txt' is supposed to be a binary image file to be sent over the board for upgrade. 'httpd' has a handler registered to process upgrade.cgi, it looks up input stream for "Content-Disposition" and then retrieves "name=file". As I understand all the strings til "-----------------------------7da271f502f4" are always invariable, but how to generate "-----------------------------7da271f502f4" like strings ? And at last: is my assumption right that it'd be sufficient to just make a connection to a localhost web server, send the above displayed strings and wait for some answers from http server? -- Mark
|
Pages: 1 Prev: Permission denied on allowed nfs shares Next: WAN port and networking, lay-man question |