Hi, On Fri, Feb 29, 2008 at 10:37:04PM +0000, place wrote:
Have you tried something like?:
</pseudocode>
Html_submit_form2() ... if (ENC_MULTIPART) { append every single "name" "value" pair into a Dstr do { make boundary } while (strstr(Dstr, boundary) || maxtries); } ... encode as usual.
</pseudocode>
If yes, why does it fail?
I hadn't looked at that specifically. Let's see...
To avoid duplicating the big case statement, I'd want to make a char *Html_get_input_value(input) { switch (input->type) { ... } return value; }
if (ENC_MULTIPART) { for (each input in the form) { value = Html_get_input_value(input); dStr_append(data, name); dStr_append(data, value); } ...boundary... etc. ... }
OK.
But for a file input, it could have embedded nulls, so make Html_get_input_value() return a Dstr* instead. Okay.
But for an image input, thanks to clickpos, I'd have to make it return a list of name/value pairs. Maybe that's not too bad, but it does put me in a bit of a "stupid HTML and its stupid special cases!" mood.
Don't worry about clickpos. Provided the current boundary skeleton it doesn't need to be checked. A comment stating this should be added.
Random thought: I wonder whether url->data gets eradicated after sending somehow, or if copies of it stick around in copies of the url on, I don't know, the nav stack or whatever. If there are copies floating around, that'll be no fun if they were each to contain a big file input in their data.
Yes, it should be checked when file input is implemented.
PS: I usually manually delete the CC of my replies to you, thinking that you'll get it from dillo-dev. Do you want the extra copy?
I know someone who, when cc:ed, tends to say "I read the list" :)
Wise guy! ;-) -- Cheers Jorge.-