Return-Path: X-Original-To: apmail-lenya-dev-archive@www.apache.org Delivered-To: apmail-lenya-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 7B4F6DE0E for ; Tue, 8 Jan 2013 13:15:18 +0000 (UTC) Received: (qmail 41785 invoked by uid 500); 8 Jan 2013 13:15:18 -0000 Delivered-To: apmail-lenya-dev-archive@lenya.apache.org Received: (qmail 41756 invoked by uid 500); 8 Jan 2013 13:15:18 -0000 Mailing-List: contact dev-help@lenya.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lenya.apache.org Delivered-To: mailing list dev@lenya.apache.org Received: (qmail 41749 invoked by uid 99); 8 Jan 2013 13:15:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2013 13:15:18 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gccld-lenya-dev@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2013 13:15:11 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TsZ1E-0002Ot-Q8 for dev@lenya.apache.org; Tue, 08 Jan 2013 14:15:04 +0100 Received: from vpn-89-206-119-235.uzh.ch ([89.206.119.235]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Jan 2013 14:15:04 +0100 Received: from andreas by vpn-89-206-119-235.uzh.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Jan 2013 14:15:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@lenya.apache.org From: Andreas Hartmann Subject: Re: asset shown directly instead of preview Date: Tue, 08 Jan 2013 14:10:00 +0100 Lines: 56 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vpn-89-206-119-235.uzh.ch User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-Virus-Checked: Checked by ClamAV on apache.org Am 08.01.13 14:05, schrieb Andreas Hartmann: > Hi Rudolf, > > Am 24.12.12 15:40, schrieb Rudolf Korhummel: >> I found out that this is related to : >> http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java?r1=907008&r2=1305170&pathrev=1305170&diff_format=h >> >> >> >> It was your commit rev=1305170 Do you remember the reason for this >> change ? >> The old version seems to work. > > sorry for the late reply. The reason was as follows: > > In a project, we are using the DefaultDocumentBuilder with an empty > extension, i.e. document URLs have the form /foo/bar instead of > /foo/bar.html. Without the change in question, this results in image > URLs being generated without extensions as well, e.g. src="/foo/myimage"/>. When an image URL is requested without the > extension though, Lenya shows the "Media Document" page, but we want the > image to be displayed. > > IMO the cleanest way would be not to use extensions but the HTTP > "Accept" header to control what media type to return. I will look into > that. I'm not sure if all browsers send a sufficiently specific Accept > header, though. Side note: This would require to set the "Vary: Accept" header for correct caching behaviour. -- Andreas >> Am 19.12.2012 um 11:55 schrieb rudolf.korhummel@uniklinik-freiburg.de: >> >>> Hi lenya devs, >>> >>> at the 2.1 branch the asset is shown directly instead of the preview >>> when I >>> switch form the site tab to the edit tab. >>> In every other situation when a preview is requested the asset is shown >>> now. This seems to be related to the latest commits. >>> >>> Best >>> >>> Rudolf >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org >>> For additional commands, e-mail: dev-help@lenya.apache.org >>> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org For additional commands, e-mail: dev-help@lenya.apache.org