/** * Set the default character set to use for reading and writing form data when * the request or response Content-Type header does not explicitly specify it. * <p>As of 4.3, this is also used as the default charset for the conversion * of text bodies in a multipart request. * <p>As of 5.0 this is also used for part headers including * "Content-Disposition" (and its filename parameter) unless (the mutually * exclusive) {@link #setMultipartCharset} is also set, in which case part * headers are encoded as ASCII and <i>filename</i> is encoded with the * "encoded-word" syntax from RFC 2047. * <p>By default this is set to "UTF-8". */ public void setCharset(@Nullable Charset charset) { if (charset != this.charset) { this.charset = (charset != null ? charset : DEFAULT_CHARSET); applyDefaultCharset(); } }
/** * Set the default character set to use for reading and writing form data when * the request or response Content-Type header does not explicitly specify it. * <p>As of 4.3, this is also used as the default charset for the conversion * of text bodies in a multipart request. * <p>As of 5.0 this is also used for part headers including * "Content-Disposition" (and its filename parameter) unless (the mutually * exclusive) {@link #setMultipartCharset} is also set, in which case part * headers are encoded as ASCII and <i>filename</i> is encoded with the * "encoded-word" syntax from RFC 2047. * <p>By default this is set to "UTF-8". */ public void setCharset(@Nullable Charset charset) { if (charset != this.charset) { this.charset = (charset != null ? charset : DEFAULT_CHARSET); applyDefaultCharset(); } }
public FormHttpMessageConverter() { this.supportedMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED); this.supportedMediaTypes.add(MediaType.MULTIPART_FORM_DATA); StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter(); stringHttpMessageConverter.setWriteAcceptCharset(false); // see SPR-7316 this.partConverters.add(new ByteArrayHttpMessageConverter()); this.partConverters.add(stringHttpMessageConverter); this.partConverters.add(new ResourceHttpMessageConverter()); applyDefaultCharset(); }
public FormHttpMessageConverter() { this.supportedMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED); this.supportedMediaTypes.add(MediaType.MULTIPART_FORM_DATA); StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter(); stringHttpMessageConverter.setWriteAcceptCharset(false); // see SPR-7316 this.partConverters.add(new ByteArrayHttpMessageConverter()); this.partConverters.add(stringHttpMessageConverter); this.partConverters.add(new ResourceHttpMessageConverter()); applyDefaultCharset(); }
/** * Set the default character set to use for reading and writing form data when * the request or response Content-Type header does not explicitly specify it. * <p>As of 4.3, this is also used as the default charset for the conversion * of text bodies in a multipart request. * <p>As of 5.0 this is also used for part headers including * "Content-Disposition" (and its filename parameter) unless (the mutually * exclusive) {@link #setMultipartCharset} is also set, in which case part * headers are encoded as ASCII and <i>filename</i> is encoded with the * "encoded-word" syntax from RFC 2047. * <p>By default this is set to "UTF-8". */ public void setCharset(@Nullable Charset charset) { if (charset != this.charset) { this.charset = (charset != null ? charset : DEFAULT_CHARSET); applyDefaultCharset(); } }
/** * Set the default character set to use for reading and writing form data when * the request or response Content-Type header does not explicitly specify it. * <p>As of 4.3, this is also used as the default charset for the conversion * of text bodies in a multipart request. * <p>As of 5.0 this is also used for part headers including * "Content-Disposition" (and its filename parameter) unless (the mutually * exclusive) {@link #setMultipartCharset} is also set, in which case part * headers are encoded as ASCII and <i>filename</i> is encoded with the * "encoded-word" syntax from RFC 2047. * <p>By default this is set to "UTF-8". */ public void setCharset(@Nullable Charset charset) { if (charset != this.charset) { this.charset = (charset != null ? charset : DEFAULT_CHARSET); applyDefaultCharset(); } }
public FormHttpMessageConverter() { this.supportedMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED); this.supportedMediaTypes.add(MediaType.MULTIPART_FORM_DATA); StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter(); stringHttpMessageConverter.setWriteAcceptCharset(false); // see SPR-7316 this.partConverters.add(new ByteArrayHttpMessageConverter()); this.partConverters.add(stringHttpMessageConverter); this.partConverters.add(new ResourceHttpMessageConverter()); applyDefaultCharset(); }
public FormHttpMessageConverter() { this.supportedMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED); this.supportedMediaTypes.add(MediaType.MULTIPART_FORM_DATA); StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter(); stringHttpMessageConverter.setWriteAcceptCharset(false); // see SPR-7316 this.partConverters.add(new ByteArrayHttpMessageConverter()); this.partConverters.add(stringHttpMessageConverter); this.partConverters.add(new ResourceHttpMessageConverter()); applyDefaultCharset(); }