richter 00/08/17 00:32:11
Modified: . Changes.pod Embperl.pm Embperl.pod EmbperlD.pod
EmbperlObject.pm INSTALL.pod TODO epcmd.c epmain.c
test.pl
Embperl Session.pm
test/cmp escape.htm input.htm
test/html escape.htm input.htm
Log:
- Embperl now supports Apache::Session 1.52. See "Session handling"
in the docs, how the setup has changed.
- changed require to use HTML::Embperl in EmbperlObject to avoid problems
with dynamic loading. Spotted by Robert.
- Embperl takes the cookie for session handling from the Apache
request record to make it available in earlier phases then the
content handler. Suggested by Jack Cushman.
- added entity decoding for value attribute of radio/checkboxes.
Spotted by Chris Thorman.
- %fdat is not resetup when already done and formtype is
multipart/formdata. Spotted by Michael Slade.
- Embperl inserts & instead of a signle & inside query strings
when expaned from array or hash refs.
- Embperl now also accepts hashref inside a url and expand it
to a query_string i.e. <a href="foo.html?[+ { a=>1, b=>2 }+]"> will become
<a href="foo.html?a=1&b=>2">.
- EMBPERL_COOKIE_EXPIRES now also supports relativ times like:
+30s +10m +1h -1d +3M +10y
Revision Changes Path
1.121 +18 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- Changes.pod 2000/08/10 19:32:45 1.120
+++ Changes.pod 2000/08/17 07:31:54 1.121
@@ -6,10 +6,28 @@
NOTE: This version is only available via L<"CVS"|CVS/"INTRO">
+ - Embperl now supports Apache::Session 1.52. See "Session handling"
+ in the docs, how the setup has changed.
- Fixed a problem with POSTed data, which had got lost for the first,
request when using EmbperlObject handler. Spotted by
Kaare Rasmussen.
- Fixed a typo in HTML::Embperl::Mail, spotted by Robert.
+ - changed require to use HTML::Embperl in EmbperlObject to avoid problems
+ with dynamic loading. Spotted by Robert.
+ - Embperl takes the cookie for session handling from the Apache
+ request record to make it available in earlier phases then the
+ content handler. Suggested by Jack Cushman.
+ - added entity decoding for value attribute of radio/checkboxes.
+ Spotted by Chris Thorman.
+ - %fdat is not resetup when already done and formtype is
+ multipart/formdata. Spotted by Michael Slade.
+ - Embperl inserts & instead of a signle & inside query strings
+ when expaned from array or hash refs.
+ - Embperl now also accepts hashref inside a url and expand it
+ to a query_string i.e. <a href="foo.html?[+ { a=>1, b=>2 }+]"> will become
+ <a href="foo.html?a=1&b=>2">.
+ - EMBPERL_COOKIE_EXPIRES now also supports relativ times like:
+ +30s +10m +1h -1d +3M +10y
=head1 1.3b4 (BETA) 17.07.2000
1.110 +12 -2 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- Embperl.pm 2000/08/16 05:34:56 1.109
+++ Embperl.pm 2000/08/17 07:31:54 1.110
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Embperl.pm,v 1.109 2000/08/16 05:34:56 richter Exp $
+# $Id: Embperl.pm,v 1.110 2000/08/17 07:31:54 richter Exp $
#
###################################################################################
@@ -728,6 +728,13 @@
$opcodemask = $cp -> mask ;
}
+ if (exists ($req -> {'cookie_expires'}) && ($$req{'cookie_expires'} =~
/^\+|\-/))
+ {
+ require CGI ;
+
+ $req -> {'cookie_expires'} = CGI::expires($req -> {'cookie_expires'},
'cookie') ;
+ }
+
my $conf = SetupConfData ($req, $opcodemask) ;
@@ -813,6 +820,7 @@
$mtime = 0 ;
}
+
my $ar ;
$ar = Apache->request if (defined ($req_rec)) ; # workaround that
Apache::Request has another C Interface, than Apache
my $r = SetupRequest ($ar, $Inputfile, $mtime, $filesize, ($$req{firstline} ||
1), $Outputfile, $conf,
@@ -841,6 +849,7 @@
@ffld = keys %fdat if (!defined ($$req{'ffld'})) ;
}
elsif (!($optDisableFormData) &&
+ !($r -> SubReq) &&
defined($ENV{'CONTENT_TYPE'}) &&
$ENV{'CONTENT_TYPE'}=~m|^multipart/form-data|)
{ # just let CGI.pm read the multipart form data, see cgi docu
@@ -899,8 +908,9 @@
$mdat = tied(%mdat) ;
my $sessid ;
my $cookie_name = $r -> CookieName ;
+ my $cookie_val = $ENV{HTTP_COOKIE} ||
($req_rec?$req_rec->header_in('Cookie'):undef) ;
- if (defined ($ENV{HTTP_COOKIE}) && ($ENV{HTTP_COOKIE} =~
/$cookie_name=(.*?)(\;|\s|$)/))
+ if (defined ($cookie_val) && ($cookie_val =~
/$cookie_name=(.*?)(\;|\s|$)/))
{
$sessid = $1 ;
print LOG "[$$]SES: Received session cookie $1\n" if ($dbgSession) ;
@@ -918,7 +928,7 @@
else
{
$udat -> setid ($sessid) ;
- $mdat -> setid (substr(MD5 -> hexhash ($Inputfile), 0, 16));
+ $mdat -> setid (substr(MD5 -> hexhash ($Inputfile), 0, $mdat -> {args}
-> {IDLength} || 16));
}
}
1.52 +34 -18 embperl/Embperl.pod
Index: Embperl.pod
===================================================================
RCS file: /home/cvs/embperl/Embperl.pod,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- Embperl.pod 2000/08/10 19:32:45 1.51
+++ Embperl.pod 2000/08/17 07:31:56 1.52
@@ -1000,11 +1000,14 @@
=head2 EMBPERL_COOKIE_EXPIRES
(only 1.2b4 or above) Set the expiration date that Embperl uses for the cookie with
the session id.
+You can specify the full date or relativ values (1.3b5 or higher). Examples: +30s
+10m +1h -1d +3M +10y
Default is none.
=head2 EMBPERL_SESSION_CLASSES
-Space separted list of object store and lock manager for Apache::Session (see
L<"Session handling">)
+Space separted list of object store and lock manager
+(and optional the serialsation and id generating class)
+for Apache::Session (see L<"Session handling">)
=head2 EMBPERL_SESSION_ARGS
@@ -1490,21 +1493,21 @@
The output of perl blocks inside the C<HREF> attribute of the C<A> Tags and the
C<SRC> attribute of the other Tags are URL escaped instead of HTML escaped.
-(see also L<$escmode>). Also when inside such a URL, I<Embperl> expands array
refernces
+(see also L<$escmode>). Also when inside such a URL, I<Embperl> expands array and
hash refernces
to URL paramter syntax. Example:
[-
- %A = (A => 1, B => 2) ;
+ $A = { A => 1, B => 2 } ; # Hashreference
@A = (X, 9, Y, 8, Z, 7)
-]
- <A HREF="http://localhost/tests?[+ [ %A ] +]">
+ <A HREF="http://localhost/tests?[+ $A +]">
<A HREF="http://localhost/tests?[+ \@A +]">
is expanded by I<Embperl> to
- <A HREF="http://localhost/tests?A=1&B=2">
- <A HREF="http://localhost/tests?X=9&Y=8&Z=7">
+ <A HREF="http://localhost/tests?A=1&B=2">
+ <A HREF="http://localhost/tests?X=9&Y=8&Z=7">
=back
@@ -1877,35 +1880,48 @@
storage and locker classes you would like to use for
I<Apache::Session>. This is done by setting the environement variable
C<EMBPERL_SESSION_CLASSES>.
-You may have a B<startup.pl> for your httpd which looks like this:
+If you want to use a MySQL database for storing your sessions, you may have a
+B<startup.pl> for your httpd which looks like this:
BEGIN
{
- $ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker" ;
+ $ENV{EMBPERL_SESSION_CLASSES} = "MySQL Semaphore" ;
$ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:mysql:session UserName=test" ;
} ;
use HTML::Embperl ;
-For B<Solaris> it's neccessary to set the C<nsems> Argument if you use
SysVSemaphoreLocker
- $Apache::Session::SysVSemaphoreLocker::nsems = 16;
+or you may put this in the httpd/srm.conf:
-You may also put this in the httpd/srm.conf:
-
- PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
+ PerlSetEnv EMBPERL_SESSION_CLASSES "MySQL Semaphore"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=test"
PerlModule HTML::Embperl ;
+Refer to the I<Apache::Session> docs (e.g. I<Apache::Session::Store::MySQL>) how
+to setup your database tables.
+
C<EMBPERL_SESSION_ARGS> is a space separated list of name/value pairs, which gives
additional arguments for Apache::Session classes.
+
+Here is an example for using a filesystem based storage:
+
+PerlSetEnv EMBPERL_SESSION_CLASSES "File Semaphore"
+PerlSetEnv EMBPERL_SESSION_ARGS "Directory=/path/to/your/sessions"
+
+Refer to the I<Apache::Session> docs which other storage/locker are available.
+
+Additionaly C<EMBPERL_SESSION_CLASSES> can (optionaly) take two further classnames,
which specifies
+the the class for serialization (Default: C<Storable>) and for generating the id
+(Default: C<MD5>).
+
+B<NOTE:> The above configuration works only with I<Apache::Session> 1.52 and
I<Embperl> 1.3b5
+or above. Older versions of Embperl only supports I<Apache::Session> 1.0x, which has
+different parameters for C<EMBPERL_SESSION_CLASSES>
+(e.g. C<$ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker" ; >)
+I<Apache::Session> 1.0x still works with this Embperl version.
-B<NOTE:> The above configuration works only with I<Embperl> 1.2b11 or above. The way
-I<Apache::Session> was used in earlier versions still works, but I have removed the
-documentation to avoid confusion. Changes are, that you don't need to load
-I<Apache::Session> anymore on your own and that I<Apache::Session 1.00> takes
-totaly different arguments then I<Apache::Session 0.17>.
Now you are able to use the %udat and %mdat hashs for your user/module sessions. As
long as you
don't touch %udat or %mdat
1.25 +38 -20 embperl/EmbperlD.pod
Index: EmbperlD.pod
===================================================================
RCS file: /home/cvs/embperl/EmbperlD.pod,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- EmbperlD.pod 2000/08/10 19:32:45 1.24
+++ EmbperlD.pod 2000/08/17 07:31:57 1.25
@@ -911,7 +911,8 @@
=head2 EMBPERL_SESSION_CLASSES
-Hier wird, durch Leerzeichen getrennt, die Klasse f�r Object Store und Lock Manager
von
+Hier wird, durch Leerzeichen getrennt, die Klasse f�r Object Store und Lock Manager
(und
+optional f�r die Serialisierung und das Generieren der ID) von
I<Apache::Session> angegeben (siehe L<"Session Handling"|"Session Handling (ab
1.2b2)">)
=head2 EMBPERL_SESSION_ARGS
@@ -946,6 +947,8 @@
=head2 EMBPERL_COOKIE_EXPIRES (ab 1.2b4)
Gibt den Ablaufzeitpunkt des Cookies an, das I<Embperl> benutzt, um die Session Id
zu senden.
+Es kann ein vollst�ndiges Datum oder (ab 1.3b5) relative Werte angegeben werden.
+Beispiele: +30s +10m +1h -1d +3M +10y
Default ist kein Ablaufzeitpunkt.
@@ -1399,15 +1402,15 @@
Die Ausgaben von Perlbl�cken innerhalb des C<HREF> Attributes des C<A> Tags und des
C<SRC> Attributes der anderen Tags werden URL Kodiert, statt HTML Kodiert.
-(siehe auch L<$escmode>). Des weiteren expandiert I<Embperl> Arrayreferenzen
+(siehe auch L<$escmode>). Des weiteren expandiert I<Embperl> Array- und
Hashreferenzen
innerhalb solcher URLs zur URL Parametersyntax. Beispiel:
[-
- %A = (A => 1, B => 2) ;
+ $A = {A => 1, B => 2} ; # Hashreference
@A = (X, 9, Y, 8, Z, 7)
-]
- <A HREF="http://localhost/tests?[+ [ %A ] +]">
+ <A HREF="http://localhost/tests?[+ $A +]">
<A HREF="http://localhost/tests?[+ \@A +]">
wird von I<Embperl> zu Folgendem expandiert:
@@ -1769,40 +1772,55 @@
Um das Session Management zu aktivieren mu� I<Apache::Session> (Version 1.00
oder h�her) installiert sein. Au�erdem m�ssen Sie I<Embperl>, via
-C<EMBPERL_SESSION_ARGS>, mitteilen, welcher
+C<EMBPERL_SESSION_CLASSES>, mitteilen, welcher
Speicher- und Lockingmechanismus genutzt werden soll, ggf. m�ssen Sie
auch weitere Argumente f�r I<Apache::Session> setzen.
-Eine Beispiel F<startup.pl> Datei, k�nnte folgenderma�en aussehen:
+Um z.B. eine MySQL Datenbank zur Speicherung der Sessions zu benutzen, k�nnte
+die Datei F<startup.pl> folgenderma�en aussehen:
BEGIN
{
- $ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker" ;
+ $ENV{EMBPERL_SESSION_CLASSES} = "MySQL Semaphore" ;
$ENV{EMBPERL_SESSION_ARGS} = "DataSource=dbi:mysql:session UserName=test" ;
} ;
use HTML::Embperl ;
-F�r B<Solaris> ist es bei der Benutzung von SysVSemaphoreLocker n�tig
-zus�tzlich das C<nsems> Argument zu setzen:
- $Apache::Session::SysVSemaphoreLocker::nsems = 16;
+Dass selbe kann stattdessen auch direkt in die F<httpd.conf> eingetragen werden:
-
-Dass selbe kann auch direkt in die F<httpd.conf> eingetragen werden:
-
- PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
+ PerlSetEnv EMBPERL_SESSION_CLASSES "MySQL Semaphore"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=test"
PerlModule HTML::Embperl ;
+
+Konsultieren Sie die Dokumentation von I<Apache::Session> (in diesem Fall
+I<Apache::Session::Store::MySQL>) f�r Informationen wie die Datenbanktabellen
+dazu aussehen m�ssen.
+
C<EMBPERL_SESSION_ARGS> ist eine Leerzeichen separierte Liste von Name/Wert Paaren
die zus�tzlich Parameter f�r die I<Apache::Session> Klassen angeben k�nnen.
+
+Hier ist ein weiteres Beispiel f�r die Speicherung der Sessiondaten im Dataisystem:
-B<HINWEIS:> Die obige Konfiguration funktioniert nur mit I<Embperl> 1.2b11 oder
+PerlSetEnv EMBPERL_SESSION_CLASSES "File Semaphore"
+PerlSetEnv EMBPERL_SESSION_ARGS "Directory=/path/to/your/sessions"
+
+Konsultieren Sie die Dokumentation von I<Apache::Session> um zu erfahren welche
+weiteren Speicherm�glichkeiten es gibt.
+
+Zus�tzlich (optional) zur zur Speicher- und Lockingklasse k�nnen in
C<EMBPERL_SESSION_CLASSES>
+zwei weitere Klassen angegeben werden. Die erste ist f�r die Serialisierung der
Daten zust�ndig
+(Default: C<Storable>) und die zweite f�r sas erzeugen der ID
+(Default: C<MD5>).
+
+
+B<HINWEIS:> Die obige Konfiguration funktioniert nur mit I<Apache::Session> 1.52
und
+I<Embperl> 1.3b5 oder
h�her. �ltere Konfigurationen mit I<Apache::Session> werden weiterhin unterst�tzt,
-die Dokumentation dazu jedoch entferent. Es ist nun nicht mehr n�tig
-I<Apache::Session> vor I<Embperl> zu laden.
-Bitte beachten Sie das I<Apache::Session>
-0.17 und 1.xx nicht kompatibel zueinander sind und eine andere
-Konfiguration erfordern.
+�ltere Versionen von Embperl unterst�tzen nur I<Apache::Session> 1.0x, welches
+eine andere Konfiguartion von C<$ENV{EMBPERL_SESSION_CLASSES}> erfordert
+(z.B. C<$ENV{EMBPERL_SESSION_CLASSES} = "DBIStore SysVSemaphoreLocker" ; >).
+
Damit ist das Session Handling eingerichtet und der Benutzung der
1.35 +1 -1 embperl/EmbperlObject.pm
Index: EmbperlObject.pm
===================================================================
RCS file: /home/cvs/embperl/EmbperlObject.pm,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- EmbperlObject.pm 2000/08/10 19:32:46 1.34
+++ EmbperlObject.pm 2000/08/17 07:31:57 1.35
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: EmbperlObject.pm,v 1.34 2000/08/10 19:32:46 richter Exp $
+# $Id: EmbperlObject.pm,v 1.35 2000/08/17 07:31:57 richter Exp $
#
###################################################################################
@@ -23,7 +23,7 @@
require Exporter;
require DynaLoader;
-require HTML::Embperl ;
+use HTML::Embperl ;
if (defined ($ENV{MOD_PERL}))
{
1.12 +2 -4 embperl/INSTALL.pod
Index: INSTALL.pod
===================================================================
RCS file: /home/cvs/embperl/INSTALL.pod,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- INSTALL.pod 2000/07/17 05:16:07 1.11
+++ INSTALL.pod 2000/08/17 07:31:57 1.12
@@ -22,8 +22,7 @@
- B<make install>
B<NOTE 1:> (only Embperl-1.2b1 or higher) For using session handling you need
-Apache::Session-0.17 or higher. If possible use Apache::Session 1.00.
-Currently Apache::Session 1.50 or higher is B<not> supported. (Coming soon)
+Apache::Session-0.17 or higher. If possible use Apache::Session 1.52 or higher.
B<NOTE 2:> I<Embperl> runs without additional Perl modules, but the C<make test>
needs the following modules to work:
@@ -101,8 +100,7 @@
B<nmake install>
B<NOTE 1:> (only Embperl-1.2b1 or higher) For using session handling you need
-Apache::Session-0.17 or higher. If possible use Apache::Session 1.00.
-Currently Apache::Session 1.50 or higher is B<not> supported. (Coming soon)
+Apache::Session-0.17 or higher. If possible use Apache::Session 1.52 or higher.
B<NOTE 2:> I<Embperl> runs without additional Perl modules, but the C<make test>
needs the following modules to work:
1.97 +3 -16 embperl/TODO
Index: TODO
===================================================================
RCS file: /home/cvs/embperl/TODO,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- TODO 2000/08/16 05:34:56 1.96
+++ TODO 2000/08/17 07:31:57 1.97
@@ -23,7 +23,7 @@
- custom html tags -> done in 2.0
-- url rewriting for session id
+- url rewriting for session id -> planned for 2.x
- disableHTMLScan inside <script>
@@ -51,7 +51,7 @@
- move default logfile to a safer place then /tmp [Christain Gilmore 20.01.00]
-- last, next for Embperl loops [Christian Gilmore 4.2.2000]
+- last, next for Embperl loops [Christian Gilmore 4.2.2000] -> planned for 2.0
- return custom error code to Apache [Alan Gutierrez 11.2.00]
@@ -64,10 +64,6 @@
- optDisableSelectScan [ Robert 14.5.00]
-- APache::Session 1.5
-
-- cookie form $req_rec [Jack Cushman 27.7.00]
-
- Execute backtrace [Jon Brisbin 12.8.00]
Test
@@ -82,8 +78,6 @@
- [* *] inside if [Vasco Chita 1.5.99] -> done in 2.0
-- use Embperl Module later than startup -> cleanup fails on first request
-
- StackFree in offline mode
- SIG DIE missing message arg [Alex Schmelkin 24.8.99]
@@ -94,24 +88,17 @@
- using outputfile inside a outputfile crashs
-- entity decoding radi/checkboxes [Chris Thorman 20.6.00]
-- %fdat not resetup with mulpart/formdata [Michael Slade 19.7.00]
-
Docs
----
- [- -] [+ +] etc all turns into _perl_code_ in html [S Page 13.9.99]
-- File::Spec for EmbperlObject
-
-- bless
-
1.3
---
- restrict number of iterations in search
-- make [+ +] configurable [ Christian Gilmore 16.10.99]
+- make [+ +] configurable [ Christian Gilmore 16.10.99] -> done in 2.0
- "$urlprefix" [Steve Willer 14.2.99]
1.34 +13 -4 embperl/epcmd.c
Index: epcmd.c
===================================================================
RCS file: /home/cvs/embperl/epcmd.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- epcmd.c 2000/01/05 05:41:38 1.33
+++ epcmd.c 2000/08/17 07:31:57 1.34
@@ -1758,21 +1758,30 @@
if (vlen > 0 && ppSV)
{
SV * pSV ;
- SV * * ppSVerg = hv_fetch(r -> pFormSplitHash, (char *)pName, nlen, 0)
;
+ SV * pSVVal ;
+ char * pTVal ;
+ STRLEN vtlen ;
+
+ SV * * ppSVerg = hv_fetch(r -> pFormSplitHash, (char *)pName, nlen, 0) ;
pSV = SplitFdat (r, ppSV, ppSVerg, (char *)pName, nlen) ;
+ pSVVal = newSVpv ((char *)pVal, vlen) ;
+ TransHtmlSV (r, pSVVal) ;
+ pTVal = SvPV (pSVVal, vtlen) ;
+
if (SvTYPE (pSV) == SVt_PVHV)
{ /* -> Hash -> check if key exists */
- if (hv_exists ((HV *)pSV, (char *)pVal, vlen))
+ if (hv_exists ((HV *)pSV, (char *)pTVal, vtlen))
bEqual = 1 ;
}
else
{
pData = SvPV (pSV, dlen) ;
- if (dlen == vlen && strncmp (pVal, pData, dlen) == 0)
+ if (dlen == vtlen && strncmp (pTVal, pData, dlen) == 0)
bEqual = 1 ;
}
- }
+ SvREFCNT_dec (pSVVal) ;
+ }
pCheck = GetHtmlArg (sArg, "CHECKED", &clen) ;
if (pCheck)
1.71 +26 -2 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- epmain.c 2000/08/10 19:32:46 1.70
+++ epmain.c 2000/08/17 07:31:57 1.71
@@ -706,6 +706,9 @@
int nFilepos = p - r -> Buf.pBuf ;
SV ** ppSV ;
AV * pAV ;
+ HV * pHV ;
+ STRLEN l ;
+ I32 li ;
EPENTRY (ScanCmdEvals) ;
@@ -797,15 +800,36 @@
ppSV = av_fetch (pAV, i, 0) ;
if (ppSV && *ppSV)
{
- OutputToHtml (r, SvPV (*ppSV, na)) ;
+ OutputToHtml (r, SvPV (*ppSV, l)) ;
}
if ((i & 1) == 0)
oputc (r, '=' ) ;
else if (i < f)
- oputc (r, '&' ) ;
+ oputs (r, "&") ;
}
}
+ else if (r -> bEscInUrl && SvTYPE(pRet) == SVt_RV && SvTYPE((pHV =
(HV *)SvRV(pRet))) == SVt_PVHV)
+ { /* Hash reference inside URL */
+ int i = 0 ;
+ HE * pEntry ;
+ char * pKey ;
+ SV * pSVValue ;
+
+ hv_iterinit (pHV) ;
+ while (pEntry = hv_iternext (pHV))
+ {
+ if (i++ > 0)
+ oputs (r, "&") ;
+ pKey = hv_iterkey (pEntry, &li) ;
+ OutputToHtml (r, pKey) ;
+ oputc (r, '=' ) ;
+
+ pSVValue = hv_iterval (pHV , pEntry) ;
+ if (pSVValue)
+ OutputToHtml (r, SvPV (pSVValue, l)) ;
+ }
+ }
else
{
OutputToHtml (r, SvPV (pRet, na)) ;
1.64 +7 -0 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- test.pl 2000/08/16 05:34:56 1.63
+++ test.pl 2000/08/17 07:31:58 1.64
@@ -764,6 +764,13 @@
unlink ($httpderr) ;
unlink ($offlineerr) ;
+#remove old sessions
+foreach (<$tmppath/*>)
+ {
+ unlink ($_) if ($_ =~ /^$tmppath\/[0-9a-f]+$/) ;
+ }
+
+
-w $tmppath or die "***Cannot write to $tmppath" ;
#### some more init #####
1.3 +6 -8 embperl/Embperl/Session.pm
Index: Session.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Session.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Session.pm 2000/08/16 05:34:57 1.2
+++ Session.pm 2000/08/17 07:32:09 1.3
@@ -123,10 +123,10 @@
use Apache::Session;
-use constant NEW => Apache::Session::NEW ;
-use constant MODIFIED => Apache::Session::MODIFIED ;
-use constant DELETED => Apache::Session::DELETED ;
-use constant SYNCED => Apache::Session::SYNCED ;
+use constant NEW => Apache::Session::NEW () ;
+use constant MODIFIED => Apache::Session::MODIFIED () ;
+use constant DELETED => Apache::Session::DELETED () ;
+use constant SYNCED => Apache::Session::SYNCED () ;
sub TIEHASH {
@@ -143,6 +143,8 @@
#Set-up the data structure and make it an object
#of our class
+
+ $args -> {IDLength} ||= 32 ;
my $self =
{
args => $args,
@@ -232,7 +234,6 @@
$self->populate;
- warn "s0 = $self->{data}->{_session_id}" ;
if (defined $session_id && $session_id)
{
if (exists $self -> {'args'}->{Transaction} && $self ->
{'args'}->{Transaction})
@@ -253,7 +254,6 @@
}
}
- warn "s00 = $self->{data}->{_session_id}" ;
if (!($self->{status} & SYNCED))
{
$self->{status} |= NEW();
@@ -262,14 +262,12 @@
if (exists ($self->{generate}))
{ # Apache::Session >= 1.50
$self->{data}->{_session_id} = &{$self->{generate}}($self) ;
- warn "s1 = $self->{data}->{_session_id}" ;
}
else
{
$self->{data}->{_session_id} = $self -> generate_id() if
(!$self->{data}->{_session_id}) ;
}
}
- warn "s2 = $self->{data}->{_session_id}" ;
$self->save;
}
1.18 +4 -3 embperl/test/cmp/escape.htm
Index: escape.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/escape.htm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- escape.htm 2000/07/17 05:16:22 1.17
+++ escape.htm 2000/08/17 07:32:09 1.18
@@ -39,8 +39,9 @@
IMG: <IMG
SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"
name="%20foo">
FORM: <FORM
action="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"
name="%20foo">
-Hash in A <A HREF="http://localhost/tests?A=1&B=2">
-Array in A <A HREF="http://localhost/tests?X=9&Y=8&Z=7">
+Hash via Array A <A HREF="http://localhost/tests?A=1&B=2">
+Hash in A <A HREF="http://localhost/tests?A=1&B=2">
+Array in A <A HREF="http://localhost/tests?X=9&Y=8&Z=7">
1
@@ -216,4 +217,4 @@
</body>
</html>
-
+
1.11 +17 -1 embperl/test/cmp/input.htm
Index: input.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/input.htm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- input.htm 1999/10/05 06:02:11 1.10
+++ input.htm 2000/08/17 07:32:10 1.11
@@ -48,6 +48,10 @@
<INPUT type="checkbox" name="cb11" value="cbv11">
+ <input type="checkbox" name="dec" checked value="a & b">
+ <input type="checkbox" name="dec" checked value="a & b">
+
+
<textarea Name=feld1></textarea>
<textarea Name=feld5>Wert5</textarea>
@@ -201,6 +205,10 @@
</tr>
<tr>
+ <td>dec</td><td>a & b</td>
+ </tr>
+
+ <tr>
<td>feld1</td><td>text1</td>
</tr>
@@ -306,6 +314,10 @@
</tr>
<tr>
+ <td>dec</td><td>a & b</td>
+ </tr>
+
+ <tr>
<td>feld1</td><td>text1</td>
</tr>
@@ -414,6 +426,10 @@
</tr>
<tr>
+ <td>dec</td><td>a & b</td>
+ </tr>
+
+ <tr>
<td>feld1</td><td>text1</td>
</tr>
@@ -583,4 +599,4 @@
</body>
</html>
-
+
1.13 +2 -1 embperl/test/html/escape.htm
Index: escape.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/escape.htm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- escape.htm 2000/07/17 05:16:26 1.12
+++ escape.htm 2000/08/17 07:32:10 1.13
@@ -44,7 +44,8 @@
FORM: <FORM action="http://localhost/tests?id=[+%20$id +]&text=[+$text+]"
name="%20foo">
[- %A = (A => 1, B => 2) ; @A = (X, 9, Y, 8, Z, 7) -]
-Hash in A <A HREF="http://localhost/tests?[+ [ %A ] +]">
+Hash via Array A <A HREF="http://localhost/tests?[+ [ %A ] +]">
+Hash in A <A HREF="http://localhost/tests?[+ \\%A +]">
Array in A <A HREF="http://localhost/tests?[+ \@A +]">
1.10 +5 -0 embperl/test/html/input.htm
Index: input.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/input.htm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- input.htm 1999/10/05 06:03:45 1.9
+++ input.htm 2000/08/17 07:32:10 1.10
@@ -60,6 +60,11 @@
<input type="checkbox" name="cb11" checked value="cbv11">
+ [- $fdat{dec} = 'a & b' -]
+ <input type="checkbox" name="dec" checked value="a & b">
+ <input type="checkbox" name="dec" checked value="a & b">
+
+
<textarea Name=feld1></textarea>
<textarea Name=feld5></textarea>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]