Mailing List Archive

Binary nulls in notes values
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.

--
<Matt/>

/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\
Re: Binary nulls in notes values [ In reply to ]
> 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


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

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------