[En-Nut-Discussion] HTTP POST data handling

Urs Zurbuchen going_nuts at myredirect.net
Sun Jan 22 21:25:32 CET 2006


Hi all

I needed a Web interface for my application which deals with html forms.

I started out using NutHttpProcessPostQuery(). Unfortunately, it has 
some drawbacks, most of all it overwrites the query parameters and the 
application never sees them. While most often used with GET requests, 
query parameters are valid for POST requests as well.

Thus, I suggest the following changes. Any thoughts, comments?

POST data is automatically read into a buffer by NutHttpProcessRequest() 
if content type is application/x-www-form-urlencoded. Maximum size can 
be limited. If there is more POST data, than the application must handle 
it itself (but then, the application developer knows his forms...). 
Access to POST data is similar to access to query parameters 
[NutHttpFormParameter(), NutHttpFormParameterName(), 
NutHttpFormParameterValue(),  NutHttpFormParameterCount()].

NutHttpProcessPostQuery() is removed.

Regards,
Urs




More information about the En-Nut-Discussion mailing list