Skip Menu |

This queue is for tickets about the FCGI CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: alastair [...] alastairs-place.net
Cc:
AdminCc:

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



Subject: Use of tied file handles breaks code that relies on PerlIO
Date: Thu, 10 Oct 2013 11:42:00 +0100
To: bug-FCGI [...] rt.cpan.org
From: Alastair Houghton <alastair [...] alastairs-place.net>
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. -- http://alastairs-place.net
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.