Makes sense. So I guess just a check that if a response returns no supported
output formats it should simply be skipped and removed to the candidate
response list?

On Fri, Oct 29, 2010 at 11:36 AM, Andrea Aime
<[email protected]>wrote:

> Hi,
> I was looking into an odd failure that was happening when the
> ogr format was around, but misconfigured (wrong ogr2ogr location).
>
> In that case the ogr format reports no output formats, and that oddly
> results in the dispatcher assuming ogr2ogr can handle every and any
> output format!
>
> The culprit seems to be in the dispatcher:
>
> if ((req.getOutputFormat() != null) && (!outputFormats.isEmpty())
>                        && !outputFormats.contains(req.getOutputFormat())) {
>
>                    //must do a case insensitive check
>                    for ( Iterator of = outputFormats.iterator();
> of.hasNext(); ) {
>                        String outputFormat = (String) of.next();
>                        if( req.getOutputFormat().equalsIgnoreCase(
> outputFormat ) ) {
>                            continue O;
>                        }
>                    }
>
>                    itr.remove();
>                }
>
> If the output format has no output formats it won't be removed from the
> list of candidates... which is wrong. The code should have a separate
> branch for the null/empty outputFormats case and just wipe out that
> response from the list
>
> Opinions?
>
> Cheers
> Andrea
>
> -----------------------------------------------------
> Ing. Andrea Aime
> Senior Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584962313
> fax:     +39 0584962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -----------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> 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.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to