lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (SOLR-1091) "phps" (serialized PHP) writer produces invalid output
Date Tue, 15 Sep 2009 21:59:57 GMT

     [ https://issues.apache.org/jira/browse/SOLR-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hoss Man reopened SOLR-1091:
----------------------------

      Assignee: Yonik Seeley

reopening because of discssion on list and yonik's new patch.

Yonik: this looks good, but i would suggest changing the system property to "solr.phps.cesu8"
so people don't set it and then later forget what it's for. 

The javadoc are also a little abiguous about what people should set it to, how about...


{code}
In order to support PHP Serialized strings with a proper byte count, This ResponseWriter 
must know if the Writers passed to it will result in an output of CESU-8 (UTF-8 w/o support

for large code points outside of the BMP)

Currently Solr assumes that all Jetty servlet containers (detected using the "jetty.home"

system property) use CESU-8 instead of UTF-8 (verified to the current release of 6.1.20).

In installations where Solr auto-detects incorrectly, the Solr Administrator should set the
"solr.phps.cesu8" system property to either "true" or "false" accordingly.
{code}


> "phps" (serialized PHP) writer produces invalid output
> ------------------------------------------------------
>
>                 Key: SOLR-1091
>                 URL: https://issues.apache.org/jira/browse/SOLR-1091
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>         Environment: Sun JRE 1.6.0 on Centos 5
>            Reporter: frank farmer
>            Assignee: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1091.patch, SOLR-1091.patch
>
>
> The serialized PHP output writer can outputs invalid string lengths for certain (unusual)
input values.  Specifically, I had a document containing the following 6 byte character sequence:
\xED\xAF\x80\xED\xB1\xB8
> I was able to create a document in the index containing this value without issue; however,
when fetching the document back out using the serialized PHP writer, it returns a string like
the following:
> s:4:"􀁸";
> Note that the string length specified is 4, while the string is actually 6 bytes long.
> When using PHP's native serialize() function, it correctly sets the length to 6:
> # php -r 'var_dump(serialize("\xED\xAF\x80\xED\xB1\xB8"));'
> string(13) "s:6:"􀁸";"
> The "wt=php" writer, which produces output to be parsed with eval(), doesn't have any
trouble with this string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message