Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F2774456 for ; Fri, 10 Jun 2011 19:47:23 +0000 (UTC) Received: (qmail 8880 invoked by uid 500); 10 Jun 2011 19:47:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 8795 invoked by uid 500); 10 Jun 2011 19:47:22 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 8788 invoked by uid 99); 10 Jun 2011 19:47:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 19:47:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 19:47:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D688B10DACC for ; Fri, 10 Jun 2011 19:46:58 +0000 (UTC) Date: Fri, 10 Jun 2011 19:46:58 +0000 (UTC) From: "David Smiley (JIRA)" To: dev@lucene.apache.org Message-ID: <164233015.11774.1307735218875.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1693036275.33921.1306018427347.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (SOLR-2535) In Solr 3.2 and trunk the admin/file handler fails to show directory listings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Smiley updated SOLR-2535: ------------------------------- Attachment: SOLR-2535_fix_admin_file_handler_for_directory_listings.patch The attached patch fixes this bug and adds new tests for a directory listing and getting a file. This bug was triggered with the introduction of SOLR-2263 in which RawResponseWriter was changed to implement BinaryQueryResponseWriter. This wasn't a problem in and of itself, but the SolrDispatchFilter checks if a response writer is the binary variant and if so calls the write(OutputStream...) variant. But the responses from ShowFileRequestHandler that list directory contents are incompatible with the RawResponseWriter if RawResponseWriter's write(OutputStream...) method is uses, instead of a character based stream. The solution was to move the defaulting of the "raw" response type from ShowFileRequestHandler.init() into into a condition within handleRequestBody() where it knows the response is a file. > In Solr 3.2 and trunk the admin/file handler fails to show directory listings > ----------------------------------------------------------------------------- > > Key: SOLR-2535 > URL: https://issues.apache.org/jira/browse/SOLR-2535 > Project: Solr > Issue Type: Bug > Components: SearchComponents - other > Affects Versions: 3.1, 3.2, 4.0 > Environment: java 1.6, jetty > Reporter: Peter Wolanin > Fix For: 3.3 > > Attachments: SOLR-2535_fix_admin_file_handler_for_directory_listings.patch > > > In Solr 1.4.1, going to the path solr/admin/file I see an XML-formatted listing of the conf directory, like: > {noformat} > > 01 > > 12742011-03-06T20:42:54Z > ... > > > {noformat} > I can list the xslt sub-dir using solr/admin/files?file=/xslt > In Solr 3.1.0, both of these fail with a 500 error: > {noformat} > HTTP ERROR 500 > Problem accessing /solr/admin/file/. Reason: > did not find a CONTENT object > java.io.IOException: did not find a CONTENT object > {noformat} > Looking at the code in class ShowFileRequestHandler, it seem like 3.1.0 should still handle directory listings if not file name is given, or if the file is a directory, so I am filing this as a bug. -- This message is automatically generated by JIRA. 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