lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] httpd: how to implement AJAX


From: address@hidden
Subject: Re: [lwip-users] httpd: how to implement AJAX
Date: Mon, 13 Nov 2017 21:25:00 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Giuseppe Modugno wrote:
The prototype for SSI callbacks is:
[..]
I don't see any reference to query string parameters. So how to select the right action?

Sorry for the confusion. This is a mix of resource optimization, missing documentation and maybe missing framework functions.

The idea is that we don't want to keep the http request pbuf(s) around until the end of the SSI file is transmitted (which might be long).
Instead, this is done in three steps:
- fs_open() calls fs_state_init(file, name) to create an object big enough to hold everything you'd need for 'file'
  (for custom files, you'll have to call this yourself)
- httpd_cgi_handler() can parse everything needed and store it in this object
- the SSI handler gets this object, too, and can access the content required
(- or alternatively, in a custom read function, you might direclty access file->state)

I just saw that the documentation for httpd_cgi_handler() was just cut off in the middle of a sentence.
I've added a short description there.

My plan is to have https examples for the next release...

Simon



reply via email to

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