On Wednesday 31 July 2013 13:45:23 Giuseppe Scrivano wrote: > Tim Ruehsen <tim.rueh...@gmx.de> writes: > >> Niwt apparently uses "an HTTP-based protocol" to communicate between > >> plugins. > > > > Any protocol has it's pros and cons. So why not doing it the same/similar > > way as Micah does ? That seems to be intuitive - dumping the original > > HTTP headers and add your extension (e.g. 'X-Wget-Filename: > > directory/filename'). > > > > An additional Version: header as the first line to interpret makes even a > > radical protocol change possible (instead the program could be called with > > a --protocol-version command-line param). > > what do you think about passing this information trough environment > variables? For example, "Server: foo\r\n" will be turned into > setenv ("HTTP_SERVER", "foo") by wget before exec the external program. > > It will work as CGI, the main advantage is that the filter program will > not have to parse the file.
That is basically a good idea. Do you have in mind to keep as close to the standard CGI environment variables as possible ? Or do you think of the CGI environment principle ? If the latter, we should use an own namespace and let environment variables start with WGET_. Regards, Tim