On Wed, Aug 3, 2011 at 11:15 AM, Ian Schneider <[email protected]>wrote:
> Hey Andrea,
>
> Thanks for bearing with the fallout from the changes. Agreed with the
> patch - this is not acceptable.
>
> I should have initiated a discussion regarding inline/attachment much
> earlier in this process, but it seems to me that inline is almost
> redundant for most output formats and serves to only add HTTP
> overhead. Most of the references I could find in my quick research
> indicate that folks use it for specific agent workarounds.
> Specifically this comes to mind with WMS services where browsers and
> clients. These superfluous headers may add a fair amount of
> non-compressed overhead.
>
> My assumption (bad) was that the inline disposition header was needed
> for some specific reason (I can't recall the type that was using it),
> though my intuition told me otherwise as I was only familiar with the
> use of attachment.
>
> I'd propose that the default be no content-disposition header unless
> either a) the format knows better (pdf, shp, etc.) or b) the client
> requests it specifically (via the new parameter API).
>
> Thoughts?
>
RIght, yeah this makes more sense and seems more like the behaviour before
the patch. +1
>
> -Ian
>
> 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® 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
> >
>
>
>
> --
> Ian Schneider
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
> ------------------------------------------------------------------------------
> BlackBerry® 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® 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