You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2002/11/03 21:27:18 UTC
cvs commit: httpd-apreq/Cookie Cookie.pm
joes 2002/11/03 12:27:18
Modified: Cookie Cookie.pm
Log:
Issac Goldstand's doc update explaining '\0' byte issues in libapreq's cookie library.
Revision Changes Path
1.6 +20 -0 httpd-apreq/Cookie/Cookie.pm
Index: Cookie.pm
===================================================================
RCS file: /home/cvs/httpd-apreq/Cookie/Cookie.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Cookie.pm 20 Jan 2002 17:27:35 -0000 1.5
+++ Cookie.pm 3 Nov 2002 20:27:18 -0000 1.6
@@ -132,6 +132,25 @@
=back
+=head1 CAVEATS
+
+=over 4
+
+The underlying C code for the Apache::Cookie module
+presents some unexpected results for Perl programmers
+when dealing with null bytes ('\0's) inside cookies.
+Native C commonly uses "null-terminated strings" when
+storing scalar string values. This means that C uses
+a '\0' byte to mark the end of the string(EOS). What
+this means for Perl programmers is that if you wish to
+create a cookie with a '\0' byte, the underlying C library
+will simply truncate the value at the '\0' byte. A cookie
+with the value '\0' will similarly simply be ignored, as
+the C library will not detect any content whatsoever.
+This problem is solved in the libapreq-2.0 library.
+
+=back
+
=head1 BUGS
=over 4
@@ -151,3 +170,4 @@
=head1 AUTHOR
Doug MacEachern, updated for v1.0 by Joe Schaefer
+updated for v1.1 by Issac Goldstand