I vote for the patch, seems a little nicer to me on existing output formats.

On Wed, Aug 3, 2011 at 10:20 AM, Andrea Aime
<[email protected]>wrote:

> Hi,
> today I started playing with GeoServer and was greeted with a non working
> layer preview, the html file would be downloaded on disk instead of
> being shown.
>
> Tracked back the issue to the get map respose returning null as the
> preferred content disposition, and thus having Content-Disposition:
> null; file=topp:states.html
> in the headers (or something like that, I did not copy it).
>
> The following patch seems to fix it:
>
> diff --git a/src/ows/src/main/java/org/geoserver/ows/Dispatcher.java
> b/src/ows/src/main/java/org/geoserver/ows/Dispatche
> index 44ed060..6f455a8 100644
> --- a/src/ows/src/main/java/org/geoserver/ows/Dispatcher.java
> +++ b/src/ows/src/main/java/org/geoserver/ows/Dispatcher.java
> @@ -792,6 +792,9 @@ public class Dispatcher extends AbstractController {
>                 }
>                 if (disposition == null) {
>                     disposition =
> response.getPreferredDisposition(result, opDescriptor);
> +                    if(disposition == null) {
> +                        disposition = Response.DISPOSITION_INLINE;
> +                    }
>                 }
>                 // this would be a good place to quote the filename
> but unsure of
>                 // compatibility - it appears to be the correct way to
> handle
>
> Generally speaking, either the response is supposed to return a non null
> preferred disposition, in which case the dispatcher should cry foul when
> a response returns null, or we do the above and have a default in case
> the response does not have an opinion
>
> Cheers
> Andrea
>
> --
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
>
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584 962313
> fax:      +39 0584 962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts.
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos & much more. Register early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to