Hi,

I think I have fixed it in my local test by adding response.setCharacterEncoding(wrapper.getCharacterEncoding());
*before*
           PrintWriter writer = response.getWriter();
in ReverseProxyFilter.java

kind regards,
Oliver May


Oliver May wrote:
Hi all,

It seems that the ReverseProxyFilter is not behaving like it should. When I fetch a big javascript (or xml) file from the geoserver the end of the file is chopped of. For example, when requesting geoserver/openlayers/OpenLayers.js, the lats characters that are returned are:
...guments);},CLASS_NAME:"OpenLayers.Laye

However, when viewing the file the last two lines are:
obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return 
obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var 
imageSize=this.getImageSize();var 
newParams={'BBOX':this.encodeBBOX?bounds.toBBOX():bounds.toArray(),'WIDTH':imageSize.w,'HEIGHT':imageSize.h};var
 requestString=this.getFullRequestString(newParams);return 
requestString;},addTile:function(bounds,position){return new 
OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},mergeNewParams:function(newParams){var
 upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return 
OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams,altUrl){var
 
projectionCode=this.map.getProjection();this.params.SRS=(projectionCode=="none")?null:projectionCode;return
 
OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(

OpenLayers.Layer.WMS,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var
 msg="The OpenLayers.Layer.WMS.Untiled class is deprecated and "+"will be removed in 3.0. Instead, you 
should use the "+"normal OpenLayers.Layer.WMS class, passing it the option "+"'singleTile' as 
true.";OpenLayers.Console.warn(msg);},clone:function(obj){if(obj==null){obj=new 
OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.options);}
obj=OpenLayers.Layer.WMS.prototype.clone.apply(this,[obj]);return 
obj;},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});

Meaning there are 675 characters missing (which is btw the amount of lines in 
the file).

I tried both on our production machine :
$ java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
$ uname -a
Linux s158562 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 
x86_64 GNU/Linux

and on my personal computer:
$ java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
$ uname -a
Linux oliverm-pc 2.6.31-22-generic-pae #61-Ubuntu SMP Wed Jul 28 03:15:32 UTC 
2010 i686 GNU/Linux

Both running tomcat6 (respectively 6.0.28 and 6.0.20)
Obviously I have enabled reverse proxy in geoservers web.xml.

I did some digging in the ReverseProxyFilter by adding the java source code to 
an existing web project. It seems the strings are all ok, but when 
writer.flush(); is called, the server doesn't return the last characters.

Any toughts?
--
Oliver May

DFC Software Engineering
GeoMajas partner www.geomajas.org

Brugsesteenweg 587
B-9030 Gent
Belgium
T: +32 9 236 61 96
F: +32 9 236 54 12
E: oliver....@dfc.be
W: www.dfc.be
------------------------------------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Oliver May

DFC Software Engineering
GeoMajas partner www.geomajas.org

Brugsesteenweg 587
B-9030 Gent
Belgium
T: +32 9 236 61 96
F: +32 9 236 54 12
E: oliver....@dfc.be
W: www.dfc.be

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to