h-tadagawa / rest-client

Automatically exported from code.google.com/p/rest-client
Apache License 2.0
0 stars 0 forks source link

Allow sending a request without a charset #164

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
We are developing REST services using Spring MVC.
1. Configure the Spring MVC JABX marshaller:

    <bean id="simpleXmlFrameworkConverter"
        class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"
        scope="tenant">
    </bean> 
    <!--
     converter registry 
     -->    
    <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" scope="tenant">
    <property name="messageConverters">
            <util:list id="beanList">                                               
                <ref bean="simpleXmlFrameworkConverter" />  
            </util:list>            
        </property>
        <!-- aop:scoped-proxy/-->       
    </bean>

    <bean id="methodHandlerExceptionResolver" class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver"
     scope="tenant">
        <property name="messageConverters">
            <util:list id="beanList">                                               
                <ref bean="simpleXmlFrameworkConverter" />  
            </util:list>    
        </property>
    </bean>
2. Create a request using POST.
3. Try to set the body Content-Type to "application/xml" WITHOUT a charset. 

What is the expected output? What do you see instead?
I would like to be able to send a request with "Content-Type=application/xml" 
and not "application/xml; charset=UTF-8". The later one isn't accepted with the 
about Spring configuration.

What version of the product are you using? On what operating system?
3.1, Win7.

Original issue reported on code.google.com by arobir...@gmail.com on 3 Dec 2012 at 2:00

GoogleCodeExporter commented 8 years ago
This isn't a defect but an improvement.

Original comment by arobir...@gmail.com on 3 Dec 2012 at 2:01

GoogleCodeExporter commented 8 years ago
When I delete the charset from the configuration window, the charset disapears 
but it is sent to the server.

Original comment by arobir...@gmail.com on 3 Dec 2012 at 2:10

GoogleCodeExporter commented 8 years ago
I was able to sent a request without a charset using the header:

Content-Type: application/xml

This overrides the content type of the POST body. I checked this using the 
trace server.

This issue could be closed as this provides the functionality I need.

Original comment by arobir...@gmail.com on 3 Dec 2012 at 3:09

GoogleCodeExporter commented 8 years ago
> When I delete the charset from the configuration window, the charset 
disapears but it is sent to the server.

This does not seem to be the correct behavior. Will need to fix this.

Thanks for reporting.

Original comment by subwiz on 4 Dec 2012 at 3:58

GoogleCodeExporter commented 8 years ago
This seems to be already fixed! Please re-open otherwise.

Original comment by subwiz on 7 Dec 2013 at 3:38