From 1b2db0b52a16aa6bd96b658aa801e249bd358cc0 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 6 Oct 2005 22:30:13 +0000 Subject: [PATCH] fix for file-share access; damaged some commits before by me :-( git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@870 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/env/grafics/notifier.gif | Bin 996 -> 824 bytes source/de/anomic/http/httpdFileHandler.java | 23 ++++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/htroot/env/grafics/notifier.gif b/htroot/env/grafics/notifier.gif index 1a5520f056dc624cff6798d972e05498a8187fd4..330c7e881e24f150e542d2e7ab11996afad442d1 100644 GIT binary patch literal 824 zcmZ`&O-NKx6#iy1=EV@y>opD%H9-pziG+yMSxh!IO47o%voOhVq~}zS+<~Hk7Pblv z+eSjP2p2=Rv_(WPkekUr+=K}B27_U;v>yvQ-+k{XNFA7W&OPVc@0|19GpWuCXPd8t z5yp35OUvi(@$#9`W!!=cOZvrL;ZdB$^L;19!0lv zo>YO@nu!VLgJM6XT&AxTah*fk_t!5(aAPK-3st&HYAfEP?#P|&&8Xx<#~vq2>Q(JG z;Sng$N01P0$dCObq|UTgrz;fxXRVjR?YiFX`0sTSvD@vK6iq2y9Go)t029+~`pgg6 z*$2RbKEp zFJ~bV`L+e4Mzp`5)s|1{c`2#6J^s_(u11N=KO&5TaTo#PNJrt>n+L|BhIFwo{&pC_ HAX@(dwRF)# literal 996 zcmbu8%WKn75QQfgZ7~W4r4&KM)Zzod$^@wv3bwH?l?sw#yU~ISqFXg!H?2XNjpEXg zidiT^5SrG4O1emW;o|P>#zmm03o8=4sx1iPncu(QT_g;1@0stMNqYNx+K-POqXhk- zqvj`=shOCu8F>|g1+^d+*aCS|gQ=Q|DVvhtm0+SKV!|fmPdON?u^6*4LCGi>sgW45 z5ejHS8d`Xa+vIcnXb2Jlhd@3Sm1`=1 zK$r?@hyfauz(Nm$p$%zh;W4=(uW>|`RmuHfEGiKdRw1_w3N%@iS()G-P`IlkN~{EX z$OD*ojX2;R5O4@;hyfauxC#yohBl<3MV_3uQRA=(d64jjv8b4Z3Aw^9D9{vQA>@dp z5dgSw9YMn_qC_6R#B0O>CK!f8P(uvRcnK_UU@){HO}-+(jW%i=!p0CJ{9!CACh`SF z>vxK1qrT5*Ne&g|?(2=BbjBzh-*#l!ks}Yj{0Pe(M3W$mp98jp@ZhOVR3oYom52&N zIif64hA2gp1jc`~>-BoAR;yGhrBbO-DCBavY&M(8WKyYAGU?iT*W)pK(P97a{{%HI zQ0#hhU%9xDZ`^(;b6{os-Q>2GfvLWkukRFM2V zU((<6(>*5#&i<^v9hzz=-cIkF`7!wL)bP!<^-GtBUtW8DKRq`7Y~*QMes$~o?C>k_kx;(f1c~dMNr;dMQS-Nik diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java index 85c20808f..29c45e070 100644 --- a/source/de/anomic/http/httpdFileHandler.java +++ b/source/de/anomic/http/httpdFileHandler.java @@ -378,25 +378,24 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http try { // locate the file - if (!(path.startsWith("/"))) { - // attach leading slash - path = "/" + path; - } - - // find defaults - String testpath = path; + if (!(path.startsWith("/"))) path = "/" + path; // attach leading slash + File targetFile = new File(htDefaultPath, path); if (path.endsWith("/")) { - File file; + String testpath; // attach default file name for (int i = 0; i < defaultFiles.length; i++) { testpath = path + defaultFiles[i]; - file = new File(htDefaultPath, testpath); - if (!(file.exists())) file = new File(htDocsPath, testpath); - if (file.exists()) {path = testpath; break;} + targetFile = new File(htDefaultPath, testpath); + if (!(targetFile.exists())) targetFile = new File(htDocsPath, testpath); + if (targetFile.exists()) {path = testpath; break;} } } - File targetFile = new File(htDefaultPath, path); + if (!(targetFile.exists())) { + // try to find that file in the htDocsPath + targetFile = new File(htDocsPath, path); + } + File targetClass = rewriteClassFile(targetFile); String targetExt = conProp.getProperty("EXT",""); Date targetDate;