<font size=2 face="sans-serif">I'm using mapserver 6.4.1 and postgis 2.1</font>
<br>
<br><font size=2 face="sans-serif">using OpenLayers 2.13.1 I draw a small
polygon that I use for a within spatial filter of a WFS getfeature request.
The problem is that mapserver is not sending this polygon to postgis, it
is sending the extent of the mapfile as filter...</font>
<br>
<br><font size=2 face="sans-serif">The wfs POST Request (created and send
by OpenLayers client)</font>
<br><font size=1 color=#2f2f2f face="DejaVu Sans Mono"><ogc:Filter xmlns:ogc="</font><a href=http://www.opengis.net/ogc><font size=1 color=blue face="DejaVu Sans Mono">http://www.opengis.net/ogc</font></a><font size=1 color=#2f2f2f face="DejaVu Sans Mono">"><ogc:Within><ogc:PropertyName>msGeometry</ogc:PropertyName><gml:Polygon
xmlns:gml="</font><a href=http://www.opengis.net/gml><font size=1 color=blue face="DejaVu Sans Mono">http://www.opengis.net/gml</font></a><font size=1 color=#2f2f2f face="DejaVu Sans Mono">"
srsName="urn:ogc:def:crs:EPSG::3857"><gml:exterior><gml:LinearRing><gml:posList>-8081644.2511244
5835062.56996 -8081707.5505384 5834980.1612889 -8081638.2794815 5834913.2788892
-8081533.1785677 5834988.5215889 -8081644.2511244 5835062.56996</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogc:Within></ogc:Filter></font><font size=3>
</font>
<br>
<br><font size=2 face="sans-serif">In Mapserver log, I see</font>
<br><font size=2 face="sans-serif">FLTLayerApplyPlainFilterToLayer():  ([shape]
 within  fromText('POLYGON ((-8081644.2511243997141719 5835062.5699599999934435,
-8081707.5505384001880884 5834980.1612889003008604, -8081638.2794815003871918
5834913.2788891997188330, -8081533.1785677000880241 5834988.5215889001265168,
-8081644.2511243997141719 5835062.5699599999934435))'))</font>
<br>
<br><font size=2 face="sans-serif">But, in postgis log I see this query,
See the</font>
<br><font size=2 face="sans-serif">select * from msp.aq_v2_3857 where geom_p
&& ST_GeomFromText('POLYGON((-9239517 5465442,-9239517 9349764,-5565974
9349764,-5565974 5465442,-9239517 5465442))',3857);</font>
<br>
<br><font size=2 face="sans-serif">See the polygon definition is different,
postgis receive the extent defined in the mapfile</font>
<br><font size=2 face="sans-serif">EXTENT -9239517 5465442 -5565974 9349764</font>
<br>
<br><font size=2 face="sans-serif">Why Mapserver is sending this polygon
to postgis?</font>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks!</font>
<p>