You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2013/01/05 18:54:13 UTC

[jira] [Comment Edited] (SOLR-4265) Fix decoding of GET/POST parameters for servlet containers with non-UTF-8 URL parsing (Tomcat)

    [ https://issues.apache.org/jira/browse/SOLR-4265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544775#comment-13544775 ] 

Uwe Schindler edited comment on SOLR-4265 at 1/5/13 5:53 PM:
-------------------------------------------------------------

bq. I still think it would have been more consistent to apply this to both the body and the URI (like Tomcat does if you request so in the config) but you can disregard me here. Maybe I'm paranoid.

Tomcat and Jetty default to a charset (according to the config). This charset is used in any case for the URL (it is always used for the URL!!!) - and it is used for the POST content if the charset is not given. If the Content-Type of the POST body is given, Jetty and Tomcat use the one given in content type.

If you have a pure GET request its disallowed to set "Content-Type" so the charset is lost.
                
      was (Author: thetaphi):
    bq. I still think it would have been more consistent to apply this to both the body and the URI (like Tomcat does if you request so in the config) but you can disregard me here. Maybe I'm paranoid.

Tomcat and Jetty default to a charset (according to the config). This charset is used in any case for the URL and for the POST content if the encoding is not given. If the Content-Type of the POST body is given, Jetty and Tomcat use the one given in content type.

If you have a pure GET request its disallowed to set "Content-Type" so the charset is lost.
                  
> Fix decoding of GET/POST parameters for servlet containers with non-UTF-8 URL parsing (Tomcat)
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4265
>                 URL: https://issues.apache.org/jira/browse/SOLR-4265
>             Project: Solr
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 4.0
>         Environment: Windows but, environment independent
>            Reporter: Alex Rocher
>            Assignee: Uwe Schindler
>         Attachments: CropperCapture[4].png, CropperCapture[5].png, CropperCapture[6].png, SOLR-4265.patch, SOLR-4265.patch, SOLR-4265.patch, SOLR-4265.patch, SOLR-4265.patch, SolrDispatchFilter.java.patch
>
>
> When you type an accent (in french language for example) in the console query tester, there's no charset conversion (servlet request charset conversion)
> Eg.: "même" is converted into it's ISO-8859-1 representation ==> fail
> The reason : getCharacterEncoding from HTTPRequest is not tested. Il it's null, il will assume to convert an UTF-8 encoding charset.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org