You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Philip Jacob (JIRA)" <ji...@apache.org> on 2006/07/19 18:13:13 UTC
[jira] Created: (SOLR-35) URL escaping problems in webapp
URL escaping problems in webapp
-------------------------------
Key: SOLR-35
URL: http://issues.apache.org/jira/browse/SOLR-35
Project: Solr
Issue Type: Bug
Components: search
Environment: Darwin berlin.local 8.7.1 Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386 i386
Reporter: Philip Jacob
Attachments: patch-utf-8-problems-webapp.patch, patch-utf-8-problems.patch
Tricia Williams reported problems with Cyrillic charsets when trying to search using the admin application, specifically NPEs and bad results.
This patch fixes the webapp by specifying a character encoding for each of the admin pages.
I also discovered a second issue in StrUtils that wasn't encoding UTF-8 data properly, so I fixed that. I'm attaching 2 patches.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (SOLR-35) URL escaping problems in webapp
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SOLR-35?page=all ]
Yonik Seeley resolved SOLR-35.
------------------------------
Resolution: Fixed
I've committed most of the changes except the logging change, which I opened SOLR-36 for.
It does seem like it would be useful to percent encode non-ascii chars when logging the query params.
Thanks!
> URL escaping problems in webapp
> -------------------------------
>
> Key: SOLR-35
> URL: http://issues.apache.org/jira/browse/SOLR-35
> Project: Solr
> Issue Type: Bug
> Components: search
> Environment: Darwin berlin.local 8.7.1 Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386 i386
> Reporter: Philip Jacob
> Attachments: patch-utf-8-problems-webapp.patch, patch-utf-8-problems.patch
>
>
> Tricia Williams reported problems with Cyrillic charsets when trying to search using the admin application, specifically NPEs and bad results.
> This patch fixes the webapp by specifying a character encoding for each of the admin pages.
> I also discovered a second issue in StrUtils that wasn't encoding UTF-8 data properly, so I fixed that. I'm attaching 2 patches.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SOLR-35) URL escaping problems in webapp
Posted by "Philip Jacob (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SOLR-35?page=all ]
Philip Jacob updated SOLR-35:
-----------------------------
Attachment: patch-utf-8-problems.patch
> URL escaping problems in webapp
> -------------------------------
>
> Key: SOLR-35
> URL: http://issues.apache.org/jira/browse/SOLR-35
> Project: Solr
> Issue Type: Bug
> Components: search
> Environment: Darwin berlin.local 8.7.1 Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386 i386
> Reporter: Philip Jacob
> Attachments: patch-utf-8-problems-webapp.patch, patch-utf-8-problems.patch
>
>
> Tricia Williams reported problems with Cyrillic charsets when trying to search using the admin application, specifically NPEs and bad results.
> This patch fixes the webapp by specifying a character encoding for each of the admin pages.
> I also discovered a second issue in StrUtils that wasn't encoding UTF-8 data properly, so I fixed that. I'm attaching 2 patches.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SOLR-35) URL escaping problems in webapp
Posted by "Philip Jacob (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SOLR-35?page=all ]
Philip Jacob updated SOLR-35:
-----------------------------
Attachment: patch-utf-8-problems-webapp.patch
> URL escaping problems in webapp
> -------------------------------
>
> Key: SOLR-35
> URL: http://issues.apache.org/jira/browse/SOLR-35
> Project: Solr
> Issue Type: Bug
> Components: search
> Environment: Darwin berlin.local 8.7.1 Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386 i386
> Reporter: Philip Jacob
> Attachments: patch-utf-8-problems-webapp.patch, patch-utf-8-problems.patch
>
>
> Tricia Williams reported problems with Cyrillic charsets when trying to search using the admin application, specifically NPEs and bad results.
> This patch fixes the webapp by specifying a character encoding for each of the admin pages.
> I also discovered a second issue in StrUtils that wasn't encoding UTF-8 data properly, so I fixed that. I'm attaching 2 patches.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SOLR-35) URL escaping problems in webapp
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SOLR-35?page=comments#action_12422198 ]
Yonik Seeley commented on SOLR-35:
----------------------------------
Thanks Phil,
Please don't make formatting changes in patches that make other changes though... it makes it very hard to see what has changed.
Here is what it looks like these patches do:
- admin JSP pages: changes charset
- adds a space between the mime-type and charset
Example: "text/xml;charset=UTF-8" => "text/xml; charset=UTF-8"
Does this fix a bug, or is it just better style?
- when logging requests, replaces partialURLEncodeVal with URLEncoder.encode()
one reason I didn't use this originally was that I wanted queries easier to read... encode() is both slower and encodes many things that don't need to be encoded.
I would much rather see q=title:"solr+search" in the log, not q=%22title%3Asolr%20search%22
> URL escaping problems in webapp
> -------------------------------
>
> Key: SOLR-35
> URL: http://issues.apache.org/jira/browse/SOLR-35
> Project: Solr
> Issue Type: Bug
> Components: search
> Environment: Darwin berlin.local 8.7.1 Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386 i386
> Reporter: Philip Jacob
> Attachments: patch-utf-8-problems-webapp.patch, patch-utf-8-problems.patch
>
>
> Tricia Williams reported problems with Cyrillic charsets when trying to search using the admin application, specifically NPEs and bad results.
> This patch fixes the webapp by specifying a character encoding for each of the admin pages.
> I also discovered a second issue in StrUtils that wasn't encoding UTF-8 data properly, so I fixed that. I'm attaching 2 patches.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SOLR-35) URL escaping problems in webapp
Posted by "Philip Jacob (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SOLR-35?page=comments#action_12422223 ]
Philip Jacob commented on SOLR-35:
----------------------------------
Hey Yonik,
Correct on the admin pages. I specified UTF-8 for everything.
The additional space after the semicolon in "text/xml; charset=UTF-8" is out of compliance. See section 14.17 of HTTP/1.1:
http://www.ietf.org/rfc/rfc2616.txt
It's a small issue, but I noticed it and figured that I'd fix it.
Using partialURLEncodeVal actually does cause bugs. The querystring is written into the logfiles and when you use UTF-8 data in the 'q' parameter, it isn't escaped properly. So while it may be slower, it in fact results in correct output being written by the logger.
> URL escaping problems in webapp
> -------------------------------
>
> Key: SOLR-35
> URL: http://issues.apache.org/jira/browse/SOLR-35
> Project: Solr
> Issue Type: Bug
> Components: search
> Environment: Darwin berlin.local 8.7.1 Darwin Kernel Version 8.7.1: Wed Jun 7 16:19:56 PDT 2006; root:xnu-792.9.72.obj~2/RELEASE_I386 i386 i386
> Reporter: Philip Jacob
> Attachments: patch-utf-8-problems-webapp.patch, patch-utf-8-problems.patch
>
>
> Tricia Williams reported problems with Cyrillic charsets when trying to search using the admin application, specifically NPEs and bad results.
> This patch fixes the webapp by specifying a character encoding for each of the admin pages.
> I also discovered a second issue in StrUtils that wasn't encoding UTF-8 data properly, so I fixed that. I'm attaching 2 patches.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira