Hmmm,
That looks fine by itself.
Could you put a test case together in a minimal catalyst app for other
ppl to try?
-ash
On 24 May 2008, at 10:12, Martin Ellison wrote:
Ash,
my $pic_image = $p->ImageToBlob();
$c->res->content_type(q{image/jpeg});
$c->res->header( 'Content-Dis
Ash,
my $pic_image = $p->ImageToBlob();
$c->res->content_type(q{image/jpeg});
$c->res->header( 'Content-Disposition', q{inline} );
$c->res->body($pic_image);
$p is an ImageMagick picture object which is creating a byte sequence
representing a JPEG image ($pic_image). I have set t
You're going to have to paste some code I've been happily serving up
PDFs (which has all sorts of binary data in it) fine.
1) How are you serving the file up?
2) What headers are you setting?
-ash
On 23 May 2008, at 16:00, Martin Ellison wrote:
Another case... the surrogate is d862 = 55394 b
Another case... the surrogate is d862 = 55394 but the image size is 45296,
so it is not looking consistent. So perhaps the 'surrogate' data is just
random bytes from the JPEG.
2008/5/23 Martin Ellison <[EMAIL PROTECTED]>:
> I've found a case
> ...stderr: UTF-16 surrogate 0xdb71 at /usr/lib/perl/5
I've found a case
...stderr: UTF-16 surrogate 0xdb71 at /usr/lib/perl/5.8/IO/Handle.pm line
199...
FastCGI: ... [info] picture size is 55966
55966 = da9e
56177 = db71
So almost the same. Perhaps I have 100 bytes of headers.
2008/5/20 Martin Ellison <[EMAIL PROTECTED]>:
> The Content-Type is se
The Content-Type is set to 'UTF-8' for most of my pages, but, in this case,
it is image/jpeg and the content disposition is set to inline.
2008/5/19 Ash Berlin <[EMAIL PROTECTED]>:
> On 19 May 2008, at 12:34, Martin Ellison wrote:
>
> I've finally had the opportunity to test my code a bit more.
On 19 May 2008, at 12:34, Martin Ellison wrote:
I've finally had the opportunity to test my code a bit more. The
$pic_image is a string of some kind and not a file handle.
Also I tried doing binmode STDOUT but this fails -- the binmode
call returns false.
There could be any binary data i
----Original Message-----
> *From:* Martin Ellison [mailto:]
> *Sent:* 12 May 2008 10:05
> *To:* The elegant MVC web framework
> *Subject:* Re: [Catalyst] UTF-16 surrogate message when writing binary
> data(image)
>
> The error is specifically at /usr/lib/perl/5.8/IO/Handl
side (again) until I can make
another chance to investigate further.
Hope all this helps - I look forward to someone else solving it for me ;)
Merlyn Kline
-Original Message-
From: Martin Ellison [mailto:]
Sent: 12 May 2008 10:05
To: The elegant MVC web framework
Subject: Re: [
The error is specifically at /usr/lib/perl/5.8/IO/Handle.pm line 199, which
is the second syswrite call in
sub syswrite {
@_ >= 2 && @_ <= 4 or croak 'usage: $io->syswrite(BUF [, LEN [,
OFFSET]])';
if (defined($_[2])) {
syswrite($_[0], $_[1], $_[2], $_[3] || 0);
} else {
On Fri, May 09, 2008 at 02:58:41PM +0800, Martin Ellison wrote:
> If I write binary data (a JPEG) using $c->res->body then I get all these
> errors
>
> stderr: UTF-16 surrogate 0xdf98 at /usr/lib/perl/5.8/IO/Handle.pm line 199.
>
> My code looks like
>
> $c->res->content_type(q{image/jpeg
If I write binary data (a JPEG) using $c->res->body then I get all these
errors
stderr: UTF-16 surrogate 0xdf98 at /usr/lib/perl/5.8/IO/Handle.pm line 199.
My code looks like
$c->res->content_type(q{image/jpeg});
$c->res->header( 'Content-Disposition', q{inline} );
$c->res->body($
12 matches
Mail list logo