You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2011/01/21 16:53:50 UTC
Re: Trouble with programatically-added servlet and @MultipartConfig
[solved]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
All,
When working with multipart/form-data, remember to follow all the rules:
* Request's Content-Length should include all the content (I had that)
* Boundary is required as part of the Content-Type (I had that, too)
* Boundary separates each of the parts (I had that)
* Each boundary is prepended with "--" (I didn't have that)
* The final boundary is postpended with "--" (I didn't have that, either)
Here is an example of a *proper* multipart/form-data request:
POST http://localhost:8007/regular HTTP/1.1
Host: localhost
Connection: close
Content-Type: multipart/form-data; boundary=--simpleboundary
Content-Length: 96
- ----simpleboundary
Content-Disposition: form-data; name="name"
value
- ----simpleboundary--
Note the additional leading "--" for all boundaries and the trailing
"--" for the last one.
All is well, now.
Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk05rA4ACgkQ9CaO5/Lv0PCvCwCeJOc5tTorIjdypMBWh2B7jBNZ
vDgAmQHqFhYrUdFOApGLaxyRZb4bQio6
=iVVP
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org