[En-Nut-Discussion] HTTP QueryString parser

Mikael Adolfsson ethernut at ma.stendahls.net
Mon Sep 8 00:17:49 CEST 2003


Hi,

I've made some modifications to the pro/httpd to make it able to parse the
QueryString into a decoded table, so you can access form parameters more
easily. Feel free to use it, or put it into the Nut/OS source, if you find
it usefull. 

Please note that this code is not tested on the ethernut board. It's only
tested on my homebuilt hardware, but should work fine on ethernut as well.

In the attached .zip-file, you'll find both the modified source-files and 
their coresponding patch-files.

The added functions are:
char *NutHttpURLEncode (char *str);
void NutHttpURLDecode (char *str);
char *NutHttpGetParameter (REQUEST *req, char *name);
int NutHttpGetParameterCount (REQUEST *req);
char *NutHttpGetParameterName (REQUEST *req, int index);
char *NutHttpGetParameterValue (REQUEST *req, int index);

Btw, I have a (very unfinished) smtp-module as well if someone is 
interested. I've found it usefull to let the board notify me by email on 
special events etc. At the moment this module can only send simple mails.

Mikael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd_param_patch.zip
Type: application/zip
Size: 9292 bytes
Desc: 
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20030908/f1d3a4c7/attachment-0001.zip>


More information about the En-Nut-Discussion mailing list