I posted my raw API HTTP daemon here a while back; it is similar to the raw contrib version, but I'd replaced the htmlgen PERL script with a 'C' program that basically performs the same operation; the major difference is that the HTTP headers are no longer embedded with the processed files but are now prepended by the daemon when requested. This way customized pages can be stored to flash by the end user and served up. I have not handled POST, but do support target-specific URL variables, which suited my needs (e.g. http\\192.168.0.1\transdata.html?trans_back=2&batch=4)
I also like the idea of a callback to the application to get data; my implementation used a permanently allocated buffer to 'expand' ROM or flash based pages (i.e. fill in server side includes). If I'd had the time to invest up front I would have preferred to come up with a solution that could stream the data, filling in the variable portions on the fly. If anybody wishes to review what I have done, either search the archives or drop me a note and I'll forward the latest. - Jim __ James M. Pettinato, Jr. Software Engineer FMC Technologies Measurement Solutions Inc. http://www.fmctechnologies.com >However, I'm currently also working on the httpd (the one in contrib - >we might need a httpd in the next product) and didn't have the NULL arg >problem yet, btu I also didn't see RST packets in wireshark. I'll have >to test it with larger files though. > <snip> > >I'm also planning POST and som kind of cgi support: is there any free >code available that we could merge back into contrib? Then I wouldn't >have to do it on my own ;-) Maybe we can collaborate - I did a crude "git er done" GET and POST handler practically hard coded for a demo. I want GET and POST to be able to reference (easily if possible) C variables - updating on a POST and returning on a GET. I was trying to get Luminary's httpd port running and had trouble. It has some interesting and worthwhile concepts. One is a callback to the app as it needs data to fill in. I was headed toward a fixed table of data which contains fields for the type and how to format the output. I was thinking of using e.g. the printf/scanf specifiers and use them to format incoming and outgoing data. There are a lot of ways to do this of course. Bill _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
