You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Eric Pugh (JIRA)" <ji...@apache.org> on 2010/12/03 20:01:21 UTC

[jira] Updated: (SOLR-2263) RawResponseWriter should properly stream binary as well as textual files

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

Eric Pugh updated SOLR-2263:
----------------------------

    Attachment: raw_response_writer.patch

Patch to use Streams instead of Writers.

> RawResponseWriter should properly stream binary as well as textual files
> ------------------------------------------------------------------------
>
>                 Key: SOLR-2263
>                 URL: https://issues.apache.org/jira/browse/SOLR-2263
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Eric Pugh
>             Fix For: 3.1
>
>         Attachments: raw_response_writer.patch
>
>
> I noticed that the RawRequestHandler can NOT properly serve up binary data like images, only textual documents.  I dug around for a while and it appears that reading in content via Streams, but sending them out via Writer doesn't work, because of character encoding problems.   
> I wanted RawRequestHandler to work with binary images because the /browse handler in 3.x uses some autocomplete functionality that looks for a "indicator.gif" in the /velocity directory.   And I'd like to be able to add other binary images to my velocity based search interface.   
> After much digging around, I realized that if I made RawResponseWriter implement BinaryQueryResponseWriter, then everything works.  I was able to stream both binary images and text documents to the browser.   
> Not sure if this is the right path to go, and if there are other ramifications that I don't grok on making this change, so wanted to put it up for discussion.  

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


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