Index: /trunk/DataStore/lib/DataStore/FileSet/Parser.pm
===================================================================
--- /trunk/DataStore/lib/DataStore/FileSet/Parser.pm	(revision 15019)
+++ /trunk/DataStore/lib/DataStore/FileSet/Parser.pm	(revision 15020)
@@ -1,5 +1,5 @@
 # Copyright (C) 2006  Joshua Hoblitt
 #
-# $Id: Parser.pm,v 1.13 2006-07-22 01:17:33 smalle Exp $
+# $Id: Parser.pm,v 1.14 2007-09-25 23:37:44 jhoblitt Exp $
 
 package DataStore::FileSet::Parser;
@@ -89,12 +89,16 @@
                     'is valid http uri' =>
                         sub { is_uri($_[0]) and $_[0] =~ /^http:/ },
-                    'uri ends with /'   => sub { $_[0] =~ m|/$| },
+                    'uri ends with /index.txt' => sub { $_[0] =~ m|/index.txt$| },
                 },
-                default =>  'http://example.org/',
+                default =>  'http://example.org/index.txt',
             },
         },
     );
 
-    my $self = bless \%p, ref $class || $class;
+    my $self = bless {}, ref $class || $class;
+
+    $p{base_uri} =~ qr|(.*?/)index.txt|;
+
+    $self->{base_uri} = $1; 
 
     return $self;
Index: /trunk/DataStore/lib/DataStore/Product.pm
===================================================================
--- /trunk/DataStore/lib/DataStore/Product.pm	(revision 15019)
+++ /trunk/DataStore/lib/DataStore/Product.pm	(revision 15020)
@@ -1,5 +1,5 @@
 # Copyright (C) 2006  Joshua Hoblitt
 #
-# $Id: Product.pm,v 1.8 2006-07-22 01:17:33 smalle Exp $
+# $Id: Product.pm,v 1.9 2007-09-25 23:37:44 jhoblitt Exp $
 
 package DataStore::Product;
@@ -102,5 +102,5 @@
                 type        => SCALAR,
                 callbacks   => {
-                    'is valid uri dirname'   => sub { $_[0] =~ m|/$| },
+                    'uri ends with /index.txt' => sub { $_[0] =~ m|/index.txt$| },
                 }
             },
Index: /trunk/DataStore/t/02_fileset_parse.t
===================================================================
--- /trunk/DataStore/t/02_fileset_parse.t	(revision 15019)
+++ /trunk/DataStore/t/02_fileset_parse.t	(revision 15020)
@@ -3,5 +3,5 @@
 # Copyright (C) 2006  Joshua Hoblitt
 #
-# $Id: 02_fileset_parse.t,v 1.8 2006-08-31 22:58:34 jhoblitt Exp $
+# $Id: 02_fileset_parse.t,v 1.9 2007-09-25 23:37:44 jhoblitt Exp $
 
 use strict;
@@ -115,5 +115,5 @@
 END
     my $parser  = DataStore::FileSet::Parser->new(
-        base_uri => 'http://foo.com/'
+        base_uri => 'http://foo.com/index.txt'
     );
     my @results = $parser->parse($example1);
@@ -132,5 +132,5 @@
 END
     my $parser  = DataStore::FileSet::Parser->new(
-        base_uri => 'http://foo.com/'
+        base_uri => 'http://foo.com/index.txt'
     );
     my $results = $parser->parse($example1);
Index: /trunk/DataStore/t/05_product.t
===================================================================
--- /trunk/DataStore/t/05_product.t	(revision 15019)
+++ /trunk/DataStore/t/05_product.t	(revision 15020)
@@ -3,5 +3,5 @@
 # Copyright (C) 2006  Joshua Hoblitt
 #
-# $Id: 05_product.t,v 1.5 2006-08-31 22:58:34 jhoblitt Exp $
+# $Id: 05_product.t,v 1.6 2007-09-25 23:37:44 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use lib qw( ./lib ./t );
 
-use Test::More tests => 22;
+use Test::More tests => 23;
 
 =head1 NAME
@@ -32,5 +32,5 @@
 
 {
-    my $dsp = DataStore::Product->new( uri => 'http://example.org/' );
+    my $dsp = DataStore::Product->new( uri => 'http://example.org/index.txt' );
 
     isa_ok($dsp, 'DataStore::Product');
@@ -39,5 +39,5 @@
 {
     my $dsp = DataStore::Product->new(
-        uri             => 'http://example.org/',
+        uri             => 'http://example.org/index.txt',
         last_fileset    => '12buckelyourshoe',
     );
@@ -47,5 +47,5 @@
 
 eval {
-    my $dsp = DataStore::Product->new( uri => 'http://example.org/', foo => 1 );
+    my $dsp = DataStore::Product->new( uri => 'http://example.org/index.txt', foo => 1 );
 };
 like($@, qr/not listed in the validation options/,
@@ -54,5 +54,5 @@
 eval {
     my $dsp = DataStore::Product->new(
-        uri             => 'http://example.org/',
+        uri             => 'http://example.org/index.txt',
         last_fileset    => '12buckelyourshoe',
         foo => 1,
@@ -65,9 +65,15 @@
     my $dsp = DataStore::Product->new( uri => 'http://example.org' );
 };
-like($@, qr/is valid uri dirname/,
-    '->new() fails when uri param does not end with /');
+like($@, qr/uri ends with \/index.txt/,
+    '->new() fails when uri param does not end with /index.txt');
 
 eval {
-    my $dsp = DataStore::Product->new( uri => '://example.org' );
+    my $dsp = DataStore::Product->new( uri => 'http://example.org/index.html' );
+};
+like($@, qr/uri ends with \/index.txt/,
+    '->new() fails when uri param does not end with /index.txt');
+
+eval {
+    my $dsp = DataStore::Product->new( uri => '://example.org/index.txt' );
 };
 like($@, qr/is valid http uri/,
@@ -76,5 +82,5 @@
 eval {
     my $dsp = DataStore::Product->new(
-        uri             => 'http://example.org/',
+        uri             => 'http://example.org/index.txt',
         last_fileset    => '++12buckelyourshoe',
     );
@@ -130,5 +136,5 @@
     print $server->Start(), "\n";
 
-    $server->RegisterURL('/', \&bar);
+    $server->RegisterURL('/index.txt', \&bar);
     $server->Process();  # Run forever
 
@@ -140,5 +146,5 @@
 
 {
-    my $dsp = DataStore::Product->new( uri => "http://localhost:$port/" );
+    my $dsp = DataStore::Product->new( uri => "http://localhost:$port/index.txt" );
 
     isa_ok($dsp->request, 'DataStore::Response');
@@ -146,5 +152,5 @@
 
 {
-    my $dsp = DataStore::Product->new( uri => "http://localhost:$port/" );
+    my $dsp = DataStore::Product->new( uri => "http://localhost:$port/index.txt" );
 
     my $dsr = $dsp->request;
@@ -168,5 +174,5 @@
 
 eval {
-    my $dsp = DataStore::Product->new( uri => 'http://example.org/' );
+    my $dsp = DataStore::Product->new( uri => 'http://example.org/index.txt' );
 
     $dsp->request( foo => 1 );
Index: /trunk/DataStore/t/08_response.t
===================================================================
--- /trunk/DataStore/t/08_response.t	(revision 15019)
+++ /trunk/DataStore/t/08_response.t	(revision 15020)
@@ -3,5 +3,5 @@
 # Copyright (C) 2006  Joshua Hoblitt
 #
-# $Id: 08_response.t,v 1.2 2006-07-22 01:17:34 smalle Exp $
+# $Id: 08_response.t,v 1.3 2007-09-25 23:37:44 jhoblitt Exp $
 
 use strict;
@@ -43,5 +43,5 @@
         status_line => 'foo',
         data        => 'bar',
-        request     => DataStore::Product->new( uri => 'http://example.org/' ),
+        request     => DataStore::Product->new( uri => 'http://example.org/index.txt' ),
     );
 
@@ -55,5 +55,5 @@
         status_line => 'foo',
         data        => 'bar',
-        request     => DataStore::Product->new( uri => 'http://example.org/' ),
+        request     => DataStore::Product->new( uri => 'http://example.org/index.txt' ),
         foo         => 1,
     );
