httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Apache::Request, APR::Table and UTF8
Date Wed, 06 Oct 2004 04:38:47 GMT
Joe Schaefer wrote:
> Boris Zentner <bzm@2bz.de> writes:
> 
> [...]
> 
> 
>>Perhaps it is better to split the byte into nibbles 0:3 for the
>>charset and 4:7 for flags. 
> 
> 
> Yes, more or less.  Here's what I've been toying with right now:
> 
> /** @brief libapreq's pre-extensible string type */
> typedef struct apreq_value_t {
>     const char    *name;    /**< value's name */
>     apr_size_t     size;    /**< Size of data.*/
>     unsigned char  flags;   /**< charset:3, tainted:1, reserved:2, apps:2 */

oh, that's a good idea to keep track of the taint flag. since that's 
another thing that we should probably restore on data retrieval in 
APR::Table, if we decide to handle UTF8.

Too bad perl flags take 32U, it'd be the easiest to just store the flags 
as is and then restore them all at once. (though may be that's not 
feasible since the status of the new variable is not the same as it was 
when it was stored)

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message