lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Download a file for firmware upgrade


From: Sergio R. Caprile
Subject: Re: [lwip-users] Download a file for firmware upgrade
Date: Mon, 21 May 2018 14:41:34 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Concerns for just GETting: well, the server might return anything other
than 200 due to a number of reasons. Besides what Ajay himself mentions,
if I'm correct, 'host' is not an HTTP/1.0 header, and so behaviour would
be implementation dependent.
If you can manage the server you can make sure you always server what
you intend to. If you feel comfortable with a minimum GET then go ahead;
I'm not fond of those approaches as not implementing the standard some
times has unexpected outcomes. It is just my opinion. My bet would be to
first try that picohttpparser Ajay mentions.

Uploading: I'm no expert on the app tree httpd server, but you can
always do that if you have CGI support, which it does have. There is no
absolute need of a client side script, just a simple form POSTing
multipart will instruct the client to open a file requester to choose
the file, something like:
<html>
<head><title>Multipart POST</title></head>
<body>
<H1>File upload</H1>
<form ACTION="fileupload.cgi" METHOD="POST" enctype="multipart/form-data">
<table>
<tr><td>Filename
<td><input TYPE="TEXT" NAME="text" size=10 value="failneim">
<td><input TYPE="FILE" NAME="filename" SIZE=10>
</table>
<input TYPE="SUBMIT" VALUE="Upload!">
</form>
</body>
</html>
will do.
Of course a JS is nicer...
The user has to get the file first and then upload to the device. Not
latest technology, I know, you can do better with scripting.
The CGI itself is strongly dependent on the server, unfortunately.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]