There seems to be a problem with the patch that was supplied for http://jira.codehaus.org/browse/GEOS-441. The patch fixes handling form based requests, however seems to have caused another problem (see below).
Justin
Justin Deoliveira wrote:
On 11/29/05, *David Blasby* <dblasby@anonymised.com <mailto:dblasby@anonymised.com>> wrote:
Justin,
You've taken out the entire SLD-POST system!
http://jira.codehaus.org/browse/GEOS-441
Your assumptions are incorrect.
For example, AJAX XMLRequestObject sets the content type as:
Content-Type: text/xmlNOTE: The test post form servlet miss-labels the content-type as
"application/x-www-form-urlencoded". (it doesnt change the
content-type)You'll get an error because the POST system is just handing it off to
the GET system.if (!isMultipartContent(request)) {
doGet(request, response);
return;
}The system is now taking a perfectly valid XML POST and handing it off
to the Get System - this has no chance of working.The GET system assumes that all the info is in parameters (get or
post), but the XML version reads them from the included XML document
(see the attached example - there's <Width> tags etc...).There were two types of SLD-POST:
* there's the full XML (as per the attached example). The XML is
just in the request body and the XML root its "<GetMap>".
* a partial XML where you put most of the parameters in the URL and
then stick the SLD_BODY in the POST portion
GetMapXMLReader#handlePostGet(). The XML is just in the request body
and the XML root is "<StyledLayerDescriptor>".If you really dont like the 2nd way, you can remove it, but it was
requested because its a happy medium for people who dont like really
long URLs (and weird URL encoding problems when you used colours
("#...") in your SLD) when you use SLD_BODY.
NOTE - <IMG> tags do not support POST so SLD-POST is a bit difficult
to actually use (way to go, OGC). I very recently re-started the
indirect post-get discussion.To reproduce (any configuration will work since all the data is in
inlinefeatures in the SLD - nifty,eh):1. go to the testpost form demo->Sample Requests
2. choose any WFS request and hit change
3. change the url to http://localhost:8080/geoserver/wms
4. copy and paste in the attached xml
5. hit submit
6. You used to get a smiling face picture back, now you get an error.If you remove the java lines from above, everything seems to go back
to working.I think if you:
1. change the testpost system so its a bit smarter with the new
request's content-type
2. make GetMap wiser about what to do based on the content-type and if
its POST. You probably want to specifically pass-off to GET for a set
of HTML-form content-types and default to POST for all others. At
least make sure that text/xml get passed off to the POST system.
3. remove the 1/2 Get - 1/2 Post system.you'll find everything works.
Please - test test test.
dave
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org