Hi Bill, Yes, I agree using GET would be much simpler to set parameters on my embedded device as compared to trying to implement POST.
I had visions of creating my web pages by cloning the web page source code of of a Linksys or Netgear device and then hack it up to fit my application. I notice that there is a lot of Java Script in the Netgear web pages. However, at this point, the path of least resistance is probably a good approach. Thank you *very much* for the link to the GET and POST overviews. I really needed that as I have not paid too much attention to web development and never implemented an embedded web server. Thanks again, -Ed From: [email protected] [mailto:[email protected]] On Behalf Of Bill Auerbach Sent: Monday, February 23, 2009 3:25 PM To: 'Mailing list for lwIP users' Subject: RE: [lwip-users] CGI - Porting uIP webserver app (httpd-cgi.c) to lwIP? Hi Ed, I would use GET for this - it's much simpler as the data you want to get to is in the HTTP headers which is easy to parse since it follows the GET. 2 years ago Frédéric BERNON posted this: http://lists.gnu.org/archive/html/lwip-users/2007-07/msg00057.html. It's a great short description of GET and POST. Bill From: [email protected] [mailto:[email protected]] On Behalf Of Ed Sutton Sent: Monday, February 23, 2009 3:56 PM To: Mailing list for lwIP users Subject: RE: [lwip-users] CGI - Porting uIP webserver app (httpd-cgi.c) to lwIP? Hi Bill, Thank you for the warning as I was not aware. If I can figure out how to use it to POST updates to my embedded device, for example to set a new static IP from a simple web page, I think I will have what I need. So far it appears that CGI only supports GET. The SSI includes work well enough though for displaying device status on a web page. I found this searching for 0x20000000: /* If the data is being read from a buffer in RAM, we need to copy it * into the PCB. If it's in flash, however, we can avoid the copy since * the data is obviously not going to be overwritten during the life * of the connection. */ err = tcp_write(pcb, hs->file, len, (hs->file < (char *)0x20000000) ? 0 : 1); Thanks again, -Ed From: [email protected] [mailto:[email protected]] On Behalf Of Bill Auerbach Sent: Monday, February 23, 2009 2:47 PM To: 'Mailing list for lwIP users' Subject: RE: [lwip-users] CGI - Porting uIP webserver app (httpd-cgi.c) to lwIP? Be careful of the system dependency that is hard coded in the source code about the location of flash and RAM. Search for 0x20000000. Bill >That looks perfect. The Adam Dunkel version of httpd.c had been modified by >Luminary Micro to offer simple server-side-include (SSI) and Common Gateway >Interface (CGI) capability. Exactly what I needed for basic setup and status >of my device. Thank you very much for taking the time to send me this detailed >information!
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
