Return-Path: X-Original-To: apmail-perl-embperl-archive@www.apache.org Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D121E92E9 for ; Wed, 4 Apr 2012 23:36:06 +0000 (UTC) Received: (qmail 73385 invoked by uid 500); 4 Apr 2012 23:36:06 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 73368 invoked by uid 500); 4 Apr 2012 23:36:06 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 73360 invoked by uid 99); 4 Apr 2012 23:36:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 23:36:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [88.191.76.8] (HELO saka.thefreecat.org) (88.191.76.8) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 23:35:59 +0000 Received: from miaou.thefreecat.org (miaou.thefreecat.org [::ffff:81.56.192.64]) by thefreecat.org with esmtp; Thu, 05 Apr 2012 01:35:37 +0200 id 0176A00A.4F7CDAC9.00005DCF Received: from [192.168.0.12] (bast.internal.thefreecat.org [::ffff:192.168.0.12]) by miaou with esmtp; Thu, 05 Apr 2012 01:51:22 +0200 id 0012C056.4F7CDE7A.00003BBA Message-ID: <4F7CDAC9.3090206@thefreecat.org> Date: Thu, 05 Apr 2012 01:35:37 +0200 From: Jean-Christophe Boggio User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 MIME-Version: 1.0 To: embperl@perl.apache.org Subject: Re: Upload problem References: <4F7C74E0.1040305@thefreecat.org> <4F7C7915.7000202@cjx.com> In-Reply-To: <4F7C7915.7000202@cjx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Le 04/04/2012 18:38, Chris Allen a �crit : > Don't know why or where, but you've got some utf8 encoding going on. > EF,BF,BD is the utf8 "replacement string" used for an unknown character (probably the initial FF). > > Suggest you sniff your data stream to see if it's happening before it reaches Embperl. tcpdump prints this : 0x0500: 7570 6c33 3831 223b 2066 696c 656e 616d upl381";.filenam 0x0510: 653d 2243 686f 7269 7374 6573 4844 312e e="ChoristesHD1. 0x0520: 6a70 6722 0d0a 436f 6e74 656e 742d 5479 jpg"..Content-Ty 0x0530: 7065 3a20 696d 6167 652f 6a70 6567 0d0a pe:.image/jpeg.. 0x0540: 0d0a ffd8 ffe0 0010 4a46 4946 0001 0101 ........JFIF.... 0x0550: 012c 012c 0000 ffe1 33ff 4578 6966 0000 .,.,....3.Exif.. So it has to be embperl-related. The site's config seems clean to me : ServerName something.fr DocumentRoot /var/www/sites/semi DirectoryIndex index.html EMBPERL_DEBUG 0 EMBPERL_APPNAME semiv2 EMBPERL_OBJECT_BASE base.epl SetHandler perl-script PerlHandler Embperl::Object Options ExecCGI Options -Indexes AuthUserFile /var/www/sites/semi/admin/.htpasswd AuthName "Administration SEMI" AuthType Basic require valid-user AddHandler cgi-script .cgi .pl .htm Options ExecCGI The /etc/apache2/conf.d/charset file is empty (all commented out). Nothing charset-related in apache2.conf (standard Debian squeeze file) The "base.epl" file contains this (I have UTF-8 accented characters in my pages) : use utf8; use encoding "utf8"; $http_headers_out{'Content-Type'}="text/html; charset=utf-8"; and : I tried creating a "test" subdir containing only the upload module and a simplistic base.epl : [- Execute("$ENV{DOCUMENT_ROOT}/basedb.epl"); Execute('*'); -] (basedb.epl only creates the $req->{dbh} handle to the DB) Still no change. Where can this encoding come from ? And why are the files smaller than the originals (UTF8 should only enlarge the file when it encounters unknown chars, no ?) And why don't they always have the same size ? Last clue : it *seems* that when I restart apache I can reliably do ONE upload. I run out of ideas so if anyone has one, I'll take it. Thanks for your help. -- Jean-Christophe Boggio -o) embperl@thefreecat.org /\\ Independant Consultant and Developer _\_V --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org