Hello all,

I am trying to process posting "multipart/form-data" in Comanche and I
am having trouble with a selection box.  It seems that selecting a
single option works just fine, but if I select two options then
Comanche will only recognize the last option selected.  (At least that
is what I see in my inspector.)

My test code is below.  I am executing it in a workspace in the Swiki
image (ComSwiki-linux.3.tar.gz).  After executing that code point your
browser to http://127.0.0.1:8020/ and the server will give you the
form.

Am I doing something wrong or is this a bug in Comanche?  (Notice that
I call #multipartFormFieldsDo: in order to make sure that all of the
post fields have been retrieved.  It looks like I should be doing
something different but I don't know what.)

Thanks for your help,
Jon

-------------------- code -----------------------------------
| module svc form |

form :=
'<html><head><title>Multi-select test</title></head><body>
After submitting view the image for posted fields in an inspector.<br>
<form action="http://127.0.0.1:8020/"; method="POST"
enctype="multipart/form-data">
<select name="sel" size="2" multiple>
<option value="one" label="1">one</option>
<option value="two" label="2">two</option>
</select><br>
<input name="button" value="Submit" type="submit">
</form></body></html>'.

module := SinglePlugModule newBlock: [:request |
        request isPostRequest ifTrue: [
                request multipartFormFieldsDo: [:x | ].
                request postFields inspect ].
        form ].
module urlPrefix: '/'.
svc := ComancheNetService named: 'Comanche-test' onPort: 8020.
svc module: module.
svc start.
-------------------- end code -------------------------------


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

Reply via email to