Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RestDataSource request: http header "Accept-Charset" discarded?

    Hi all,
    I wonder if sending the additional header Accept-Charset is disabled by design on RestDataSource http requests (at least on Firefox 5).
    Take for instance a look at the following snippet.
    Code:
        final RestDataSource mainDataSource = new RestDataSource ();
        mainDataSource.setDataFormat (DSDataFormat.JSON);
        mainDataSource.setDataURL ("data/mainds_fetch.js");
    		
        final Map<String, String> headers = new HashMap<String, String> ();
        headers.put ("Accept", "application/json");
        headers.put ("Accept-Charset", "UTF-8");//never sent
        headers.put ("myheader", "foo");
    		
        final DSRequest request = new DSRequest ();
        request.setHttpHeaders (headers);
        mainDataSource.setRequestProperties (request);
    Calling fetchData on taht data source I noticed the headers configuration only affects the Accept header and myheader, but not Accept-Charset.
    Tested with Firefox 5.0 and SmartClient Version: SC_SNAPSHOT-2011-08-02/LGPL Development Only (built 2011-08-02)

    Cheers
    Davide

    #2
    It's not something we're doing. Browsers do not allow all HTTP headers to be set from a web application.

    Comment

    Working...
    X