*About the file upload
For those who don't know, I'm a student, and my project for this semester(s) is
to contibute in a valuable way to mod_dtcl. I started to speak/chat with David
two weeks ago about the way to get the data from a multipart/form.
I already wrote a cgi library which does support multiport formulary, and not
only binary file uploads but any types of inputs.
The actual problem of implemeting it in tcl is the bad handling of strings
conataining null characters and the method i used in my lib wasn't neat and
noone came to me with a better solution yet. This is why I think this part
should be like all the form processing steps within mod_dtcl.
Last week I played a lot with file upload and php, this is the same aproach than
for cgi.tcl or my library: the file is first saved in a directory, then you can
access it.
The problem of this method is that you have to move/rename/modify the file
whithin the next page.
The ideal way of uploading would be being able to send an infos with the file
upload which will determine the maximum size, the file type,name and why note a
script to process it.
The problem in doing so (php does it for the file size) is that this information
should be sent by a hidden input in the web page, that a malicious person could
modify and send enormous files to the server. This is why a 2Mb limit is
hardcoded in php (unless you recompile it).
So, if we go thru the idea that as long as mod_dtcl parse the incoming data and
cut it in chuncks of files and vars, it should ne before how it will handle it.
And I see two methods of doing so:
First of all, the input files should be registred in a configuration file with
the important values such as max, mime type and associated with script if needed
and naturally a default line which will take care of unregistred inputs.
The advantage of such a method is that mod_tcl could be able to stop the process
of the parsing/uploading in case of unmatching requirement. The problem of such
a method is that it's another configuration file.. and those configuartions
files should be maintained by each user of the web site.
The other solution would be to make mod_dtcl preprocess the header of the next
page to see if it founds infos on the file upload. (I don't like this way, I
think it would be to messy)
Technically the file upload would take place in parseargs() which does get the
multipart/form-data datas.
I'm planing to write the upload file part of mod_dtcl, but as I said I'm quite
new to C coding and my code will have probably to be strongly reviewed.
I expects comments and ideas about this.
# Features i want to see
* Connection to databases in a keep_alive way.
Maybe it's not directly linked to mod_dtcl and maybe this request should be seen
as a simple module loaded by a ChildInitScript.
I would have a great interest in a way to maintain a connection to a database as
a full time open connection, where the connection should be maintained whithin
the apache child. I mean this module would by itself open a connection reopen it
if it's closed by a database shudown, commit the queries and clean the memory.
* Levels of variable
I would like also a top level variables space. Variables that could be
read/write by any interpreters. I see the use of this for flags that indicate
that another interpreter is using a resource. Some others top level variables
could have a long life support. They should be able to survive to a server
shutdown, by being dumped into a file or a db.
Those were features i wanted to see..
PM Legris (Perki)
-------------------------------------------------
This mail sent through IMP: imap.epfl.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]