Re: Apache::URI port() problem
It works! Thanks so much! Fred Eric Cholet wrote: Hello, It seems the method unparse() of Apache::URI does not take the port value into the result string. For example, I have: my $uri = Apache::URI-parse($r, $r-uri); $uri-scheme('http'); $uri-hostname($r-get_server_name); $uri-port(8080); $uri-query(scalar $r-args); If I call $uri-unparse(), the string returned does not have port 8080 in it. Can anyone shed some light? Thanks. Fred Xia Can you try this patch? Index: URI.xs === RCS file: /home/cvs/modperl/src/modules/perl/URI.xs,v retrieving revision 1.5 diff -b -u -u -r1.5 URI.xs --- URI.xs 1998/11/13 03:27:52 1.5 +++ URI.xs 2000/04/10 10:57:54 @@ -183,6 +183,9 @@ CODE: get_set_PVp(uri-uri.port_str,uri-pool); +if (items 1) { +uri-uri.port = (int)SvIV(ST(1)); +} OUTPUT: RETVAL -- Eric
Apache::URI port() problem
Hello, It seems the method unparse() of Apache::URI does not take the port value into the result string. For example, I have: my $uri = Apache::URI-parse($r, $r-uri); $uri-scheme('http'); $uri-hostname($r-get_server_name); $uri-port(8080); $uri-query(scalar $r-args); If I call $uri-unparse(), the string returned does not have port 8080 in it. Can anyone shed some light? Thanks. Fred Xia
First argument to Apache::Cookie-new
I have noticed that although it is required to pass $r to Apache::Cookie-new() as the first argument, it appears that no type checking is performed. In other words, if I pass anything else as the first arg, no error is reported. However the subsequent call to $cookie-as_string will result in an empty string. I wonder if it is possible to do a simple type checking there, since this is the biggest difference from CGI::Cookie, and for people familiar with CGI::Cookie it would be a nice debugging info. Thanks very much. Fred Xia
REDIRECT missing Cookie
Hi, I'm having a problem with setting the cookie in a REDIRECT. Basically, I'm doing this in a handler: $r-headers_out-add('Set-Cookie' = $cookie); $r-headers_out-add('Location' = $location); return REDIRECT; The $location is hit but the cookie is missing when I debug the handler for $location. I have tried various remedies, such as no_cache(), unset('Content-length'), etc. But nothing seems have effect. Can anyone point out what is the problem? Thanks so much. Fred Xia
Re: REDIRECT missing Cookie
I have tried this but with no success. I'm running NS4.7 on RH6.1. What I found when I use Apache::Debug::dump() is that if I use a simple string as the $cookie, the cookie is passed along redirect. However if the $cookie is an object of CGI::Cookie, it is missing in the redirect request. Fred Xia Ken Williams wrote: [EMAIL PROTECTED] (Zeqing Xia) wrote: Hi, I'm having a problem with setting the cookie in a REDIRECT. Basically, I'm doing this in a handler: $r-headers_out-add('Set-Cookie' = $cookie); $r-headers_out-add('Location' = $location); return REDIRECT; Try changing to $r-err_headers_out. Details in the eagle book. ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum