cvs commit: embperl/xsbuilder/maps ep_structure.map

2003-01-01 Thread richter
richter 2003/01/01 23:39:44

  Modified:.Changes.pod epcgiinit.c epdat2.h mod_embperl.c
   eg/web   base.epl
   eg/web/db epwebapp.pl list.epl newpw.mail newuser.mail
updateditem.mail
   xsbuilder/maps ep_structure.map
  Log:
   -> param -> server_addr + website updates
  
  Revision  ChangesPath
  1.194 +1 -0  embperl/Changes.pod
  
  Index: Changes.pod
  ===
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.193
  retrieving revision 1.194
  diff -u -r1.193 -r1.194
  --- Changes.pod   23 Dec 2002 20:47:35 -  1.193
  +++ Changes.pod   2 Jan 2003 07:39:43 -   1.194
  @@ -50,6 +50,7 @@
generated tags to contains a closing slash, so they are valid XML/XHTML. 
  - Fix make test to ignore different idention of newer versions of
libxslt.
  +   - Added server_addr to the request param object.
   
   =head1 2.0b8  (BETA)  25. Juni 2002
   
  
  
  
  1.4   +35 -1 embperl/epcgiinit.c
  
  Index: epcgiinit.c
  ===
  RCS file: /home/cvs/embperl/epcgiinit.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- epcgiinit.c   26 Nov 2002 10:03:40 -  1.3
  +++ epcgiinit.c   2 Jan 2003 07:39:44 -   1.4
  @@ -268,6 +268,10 @@
   tThreadData * pThread = pApp -> pThread ;
   eptTHX_
   char * p ;
  +char buf[20] ;
  +char * sHost ;
  +intnPort ;
  +char * scheme ;
   
   pParam -> sFilename= GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"PATH_TRANSLATED", "") ;
   pParam -> sUnparsedUri = GetHashValueStrDup  (aTHX_ pPool, pThread -> pEnvHash, 
"REQUEST_URI", "") ;
  @@ -293,6 +297,36 @@
   
   embperl_String2HV(pApp, p, ';', pHV) ;
   }
  +
  +
  +buf[0] = '\0' ;
  +nPort = GetHashValueInt (aTHX_ pThread -> pEnvHash, "SERVER_PORT", 80) ;
  +if (GetHashValueStr (aTHX_ pThread -> pEnvHash, "HTTPS", NULL))
  +{
  + scheme = "https" ;
  + if (nPort != 443)
  + sprintf (buf, ":%d", nPort) ;
  + }
  +else
  +{
  + scheme = "http" ;
  + if (nPort != 80)
  + sprintf (buf, ":%d", nPort) ;
  + }
  +
  +if (!(sHost = GetHashValueStr (aTHX_ pThread -> pEnvHash, "HTTP_HOST", NULL)))
  + {
  +sHost = GetHashValueStr (aTHX_ pThread -> pEnvHash, "SERVER_NAME", "") ;
  +
  +pParam -> sServerAddr = ep_pstrcat (pPool, scheme, "://", 
  + sHost, buf,  "//", NULL) ;
  + }
  +else
  + {
  +pParam -> sServerAddr = ep_pstrcat (pPool, scheme, "://", 
  + sHost,  "//", NULL) ;
  + }
  + 
   
   return ok ;
   }
  
  
  
  1.4   +2 -1  embperl/epdat2.h
  
  Index: epdat2.h
  ===
  RCS file: /home/cvs/embperl/epdat2.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- epdat2.h  26 Nov 2002 10:03:40 -  1.3
  +++ epdat2.h  2 Jan 2003 07:39:44 -   1.4
  @@ -119,6 +119,7 @@
   char *  sFilename ;
   char *  sUnparsedUri ;
   char *  sUri ;
  +char *  sServerAddr ;/**< protocol://server:port */
   char *  sPathInfo ;
   char *  sQueryInfo ;
   char *  sLanguage ; /**< Language for the current request */
  
  
  
  1.4   +25 -1 embperl/mod_embperl.c
  
  Index: mod_embperl.c
  ===
  RCS file: /home/cvs/embperl/mod_embperl.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_embperl.c 26 Nov 2002 10:03:42 -  1.3
  +++ mod_embperl.c 2 Jan 2003 07:39:44 -   1.4
  @@ -924,6 +924,9 @@
   epaTHX_
   char * p ;
   struct addcookie s ;
  +char buf[20] ;
  +char * scheme ;
  +
   s.pApp = a ;
   s.pParam = pParam ;
   
  @@ -944,6 +947,27 @@
   }
   
   ap_table_do (embperl_AddCookie, &s, r -> headers_in, "Cookie", NULL) ;
  +
  +buf[0] = '\0' ;
  +#ifdef EAPI
  +if (ap_ctx_get (r -> connection -> client -> ctx, "ssl"))
  +{
  + scheme = "https" ;
  + if (r -> server -> port != 443)
  + sprintf (buf, ":%d", r -> server -> port) ;
  + }
  +else
  +#endif
  +{
  + scheme = "http" ;
  + if (r -> server -> port != 80)
  + sprintf (buf, ":%d", r -> server -> port) ;
  + }
  +
  +
  +pParam -> sServerAddr = ep_pstrcat (pPool, scheme, "://", 
  + r -> hostname?r -> hostname:r -> server -> server_hostname, buf,  
"//", NULL) ;
  +
   
   return ok ;
   }
  
  
  
  1.4   +1 -0  embperl/eg/web/base.epl
  
  Index: base.epl
  =

cvs commit: embperl/podsrc Config.spod

2003-01-01 Thread richter
richter 2003/01/01 23:42:41

  Modified:podsrc   Config.spod
  Log:
  doc updates
  
  Revision  ChangesPath
  1.5   +6 -0  embperl/podsrc/Config.spod
  
  Index: Config.spod
  ===
  RCS file: /home/cvs/embperl/podsrc/Config.spod,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Config.spod   26 Nov 2002 10:03:45 -  1.4
  +++ Config.spod   2 Jan 2003 07:42:41 -   1.5
  @@ -1161,6 +1161,12 @@
   
   The decoded path of the unparsed_uri.
   
  +=head2 *PARAM $request / / server_addr / 2.0b9 / yes
  +
  +URL of the server of the current request in the form
  +schema://addr:port/ e.g. http://perl.apache.org/ (port is omitted if it is
  +an default port)
  +
   =head2 *PARAM $request / / path_info / 2.0b6 / yes
   
   The path_info, that is anything in the path after the file the is currently served.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: embperl/eg/web config.pl

2003-01-01 Thread richter
richter 2003/01/01 23:51:33

  Modified:eg/web   config.pl
  Log:
  website updates
  
  Revision  ChangesPath
  1.5   +2 -1  embperl/eg/web/config.pl
  
  Index: config.pl
  ===
  RCS file: /home/cvs/embperl/eg/web/config.pl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- config.pl 26 Nov 2002 10:03:44 -  1.4
  +++ config.pl 2 Jan 2003 07:51:33 -   1.5
  @@ -11,7 +11,8 @@
   $self -> {dbdsn}  = $^O eq 'MSWin32'?'dbi:ODBC:embperl':'dbi:mysql:embperl' 
;
   $self -> {dbuser} = 'www' ;
   $self -> {dbpassword} = undef ;
  -$self -> {adminemail} = '[EMAIL PROTECTED]';
  +$self -> {adminemail} = '[EMAIL PROTECTED]';
  +$self -> {mailfrom}   = '[EMAIL PROTECTED]';
   
   # There is normaly no need to change anything below this line
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]