geoserver/geoserver — pull request #788 by Damianofds (2014-10-21 14:04:41+00:00)
Title: [GEOS-6712]Add charset definition in HTTP headers when returning textbased responses

this pull request is to fix GEOS-6712 (http://jira.codehaus.org/browse/GEOS-6712)

This implementation add a default method **getCharset(Operation operation)** in the Response.java class.
The default implementation always return null (we don't want to return the charset for binaries output format) and all Response subclasses are responsible for override it in case the output format is text format (jsnon,csv, html ecc...).

The Dispatcher.java now check for the charset: if it is not null set it in the httpResponse

The responses subclasses has been changed (getCharset method has been overridden) in this pull req are:
GeoJSONGetFeatureResponse.java
CSVOutputFormat.java
JSONDescribeLayerResponse.java
GeoJSONFeatureInfoResponse.java
HTMLFeatureInfoOutputFormat.java
TextFeatureInfoOutputFormat.java

This pull req contains also new tests for each changed Response (or one more assert when a test is already present)