perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <>
Subject Re: Binary nulls in notes values
Date Mon, 15 Jan 2001 04:40:45 GMT

> There doesn't appear to be a way to work with notes values that contain
> binary nulls - we get the value out using newSVpv(sv, 0), which uses
> strlen to calculate the length, which stops at the first null. I can't
> find any way to get at the length of the value in a table.
> Am I mistaken or is this intentional? Its a bit of a disaster for things
> like Apache::Filter which might need to send (for example) DVI's which
> contain multiple NULLs, and of course AxKit, which is how I discovered the
> problem. I'm thinking of switching to pnotes instead.

notes are a part of the Apache API. Notes are stored in an Apache table,
which only works with null terminated strings, so you can't store binary
nulls into such a notes the table. The problem is not the newSVpv(sv,0), but
the Apache API.

To pass binary data, you have to switch to pnotes, which is implemented by
mod_perl (therefore ins't accessable by other Apache modules), but can store
any binary data.


Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:         Voice:    +49 6133 925151
WWW:      Fax:      +49 6133 925152

View raw message