Skip Menu |

This queue is for tickets about the FCGI CPAN distribution.

Report information
The Basics
Id: 89383
Status: open
Priority: 0/
Queue: FCGI

Owner: Nobody in particular
Requestors: alastair [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

From alastair [...] Thu Oct 10 06: 42:20 2013
MIME-Version: 1.0 (Mac OS X Mail 7.0 \(1812\))
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
X-Mailer: Apple Mail (2.1812)
X-Spam-Flag: NO
Message-ID: <ACCDC835-05B3-4D2A-B416-6BBDF28261BD [...]>
content-type: text/plain; charset="utf-8"
X-Virus-Scanned: Debian amavisd-new at
X-Virus-Scanned: Debian amavisd-new at
X-Spam-Score: -6.899
Received: from localhost (localhost []) by (Postfix) with ESMTP id 8D7082406E2 for <cpan-bug+FCGI [...]>; Thu, 10 Oct 2013 06:42:20 -0400 (EDT)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id tbk2BYO6MMcQ for <cpan-bug+FCGI [...]>; Thu, 10 Oct 2013 06:42:18 -0400 (EDT)
Received: from ( []) by (Postfix) with SMTP id 133B22407D6 for <bug-FCGI [...]>; Thu, 10 Oct 2013 06:42:17 -0400 (EDT)
Received: (qmail 4366 invoked by alias); 10 Oct 2013 10:42:17 -0000
Received: from (HELO ( by (qpsmtpd/0.28) with ESMTP; Thu, 10 Oct 2013 03:42:08 -0700
Received: from localhost (localhost []) by (Postfix) with ESMTP id BC92120082 for <bug-FCGI [...]>; Thu, 10 Oct 2013 10:42:03 +0000 (UTC)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id SlRF0nkFN09H for <bug-FCGI [...]>; Thu, 10 Oct 2013 10:42:01 +0000 (UTC)
Received: from [] ( []) by (Postfix) with ESMTPSA id 617E920081 for <bug-FCGI [...]>; Thu, 10 Oct 2013 10:42:01 +0000 (UTC)
Delivered-To: cpan-bug+FCGI [...]
Subject: Use of tied file handles breaks code that relies on PerlIO
Return-Path: <alastair [...]>
X-RT-Mail-Extension: fcgi
X-Original-To: cpan-bug+FCGI [...]
Date: Thu, 10 Oct 2013 11:42:00 +0100
To: bug-FCGI [...]
Content-Transfer-Encoding: quoted-printable
From: Alastair Houghton <alastair [...]>
X-RT-Original-Encoding: cp1252
X-RT-Interface: Email
Content-Length: 695
Download (untitled) / with headers
text/plain 695b
FCGI’s FCGI::Stream file handle code breaks any code that relies on PerlIO for character encoding. (The popular Open Source ticket system OTRS is one such program that is affected by this problem.) The odd behaviour that results is quite hard to diagnose, particularly for a non-Perl programmer, as it looks like everything should be working but e.g. character output arrives at the web server in the wrong encoding. A fix would be to migrate FCGI::Stream to PerlIO, which would mean that calls to binmode() would work as expected. Unfortunately I am not a sufficiently experienced Perl programmer to be able to do that myself. Kind regards, Alastair. --
MIME-Version: 1.0
In-Reply-To: <ACCDC835-05B3-4D2A-B416-6BBDF28261BD [...]>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <ACCDC835-05B3-4D2A-B416-6BBDF28261BD [...]>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-16477-1393967045-192.89383-0-0 [...]>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 252
Download (untitled) / with headers
text/plain 252b
The tied handle also doesn't "correctly" implement the 3-argument open API as it interpolates the the argument by using a string eval. I just spent quite a bit of time tracking down a vary non-obvious bug because of both the tie and the incorrect API.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to