* remote_ip * remote_host * aborted * local_ip * local_host
I didn't know how to write a test for local_addr and remote_addr maybe someone could give me a pointer how to create such an APR::SockAddr-Object?
Tom
Tom Schindl wrote:
Stas Bekman wrote:
I've compared the latest accessors api with Geoff and Philippe comments on Fred's patch and added the following entry to todo/api_status:
* the following accessors might be turned into read/write (they are readonly at the moment). if you think that should be the case, please document the change and hopefully add a new sub-test.
conn_rec: --------- local_addr remote_addr remote_ip remote_host aborted local_ip local_host
because this came up on the user-mailing list and this breaks Apache-AuthenNTLM-2.07(remote_host => not writeable).
Could the test be added in t/response/TestAPI/conn_rec.pm like e.g. it is done in t/response/TestAPI/request_rec.pm else could you give me any pointers.
ap_directive_t: --------------- next first_child parent filename line_num
Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird
Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird
-- b e s t s o l u t i o n . a t EDV Systemhaus GmbH ------------------------------------------------------------------------ tom schindl leiter softwareentwicklung mobile ++43 664 3145958 ------------------------------------------------------------------------ eduard-bodem-gasse 8/3 A-6020 innsbruck fax ++43 512 935833 http://www.bestsolution.at phone ++43 512 935834
Index: t/response/TestAPI/conn_rec.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/t/response/TestAPI/conn_rec.pm,v
retrieving revision 1.15
diff -u -r1.15 conn_rec.pm
--- t/response/TestAPI/conn_rec.pm 13 Aug 2004 02:06:02 -0000 1.15
+++ t/response/TestAPI/conn_rec.pm 20 Sep 2004 19:12:38 -0000
@@ -20,7 +20,7 @@
my $c = $r->connection;
- plan $r, tests => 14;
+ plan $r, tests => 19;
ok $c;
@@ -52,6 +52,42 @@
ok $c->id || 1;
ok $c->notes;
+
+ ## check if we can set remote_ip
+ {
+ my $remote_ip = "127.0.0.2";
+ $c->remote_ip($remote_ip);
+ ok t_cmp $c->remote_ip, $remote_ip, '$c->remote_ip';
+ }
+
+
+ ## check if we can set remote the remote host
+ {
+ my $remote_host = "foo.bar.com";
+ $c->remote_host($remote_host);
+ ok t_cmp $c->remote_host, $remote_host, '$c->remote_host';
+ }
+
+ ## check if we can set aborted
+ {
+ my $aborted = 1;
+ $c->aborted($aborted);
+ ok t_cmp $c->aborted, $aborted, '$c->aborted';
+ }
+
+ ## check if we can set local_ip
+ {
+ my $local_ip = "127.0.0.2";
+ $c->local_ip($local_ip);
+ ok t_cmp $c->local_ip, $local_ip, '$c->aborted';
+ }
+
+ ## check if we can set local_host
+ {
+ my $local_host = "foo.bar.com";
+ $c->local_host($local_host);
+ ok t_cmp $c->local_host, $local_host, '$c->local_host';
+ }
# XXX: missing tests
# conn_config
Index: todo/api_status
===================================================================
RCS file: /home/cvspublic/modperl-2.0/todo/api_status,v
retrieving revision 1.40
diff -u -r1.40 api_status
--- todo/api_status 17 Sep 2004 23:47:09 -0000 1.40
+++ todo/api_status 20 Sep 2004 19:12:38 -0000
@@ -148,11 +148,6 @@
---------
local_addr
remote_addr
- remote_ip
- remote_host
- aborted
- local_ip
- local_host
ap_directive_t:
---------------
Index: xs/maps/apache_structures.map
===================================================================
RCS file: /home/cvspublic/modperl-2.0/xs/maps/apache_structures.map,v
retrieving revision 1.48
diff -u -r1.48 apache_structures.map
--- xs/maps/apache_structures.map 17 Sep 2004 00:07:24 -0000 1.48
+++ xs/maps/apache_structures.map 20 Sep 2004 19:12:38 -0000
@@ -105,15 +105,15 @@
> vhost_lookup_data
< local_addr
< remote_addr
-< remote_ip
-< remote_host
+ remote_ip
+ remote_host
- remote_logname
-< aborted
+ aborted
keepalive
? double_reverse
keepalives
-< local_ip
-< local_host
+ local_ip
+ local_host
< id
< conn_config
notes--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
