dos newlines to unix ones, so native can kick in
[catagits/Catalyst-Authentication-Credential-HTTP.git] / t / live_app_digest.t
index e0e2ad4..c6ac1c7 100644 (file)
@@ -54,40 +54,62 @@ $mech->get("http://localhost/moose");
 is( $mech->status, 401, "status is 401" );
 
 my $www_auth = $mech->res->headers->header('WWW-Authenticate');
-my %www_auth_params = map {\r
-    my @key_val = split /=/, $_, 2;\r
-    $key_val[0] = lc $key_val[0];\r
-    $key_val[1] =~ s{"}{}g;    # remove the quotes\r
-    @key_val;\r
+my %www_auth_params = map {
+
+    my @key_val = split /=/, $_, 2;
+
+    $key_val[0] = lc $key_val[0];
+
+    $key_val[1] =~ s{"}{}g;    # remove the quotes
+
+    @key_val;
+
 } split /, /, substr( $www_auth, 7 );    #7 == length "Digest "
 
 $mech->content_lacks( "foo", "no output" );
 
 my $response = '';
 {
-    my $username = 'Mufasa';\r
-    my $password = 'Circle Of Life';\r
-    my $realm    = $www_auth_params{realm};\r
-    my $nonce    = $www_auth_params{nonce};\r
-    my $cnonce   = '0a4f113b';\r
-    my $opaque   = $www_auth_params{opaque};\r
-    my $nc       = '00000001';\r
-    my $method   = 'GET';\r
-    my $qop      = 'auth';\r
+    my $username = 'Mufasa';
+
+    my $password = 'Circle Of Life';
+
+    my $realm    = $www_auth_params{realm};
+
+    my $nonce    = $www_auth_params{nonce};
+
+    my $cnonce   = '0a4f113b';
+
+    my $opaque   = $www_auth_params{opaque};
+
+    my $nc       = '00000001';
+
+    my $method   = 'GET';
+
+    my $qop      = 'auth';
+
     my $uri      = '/moose';
 
-    my $ctx = Digest::MD5->new;\r
-    $ctx->add( join( ':', $username, $realm, $password ) );\r
+    my $ctx = Digest::MD5->new;
+
+    $ctx->add( join( ':', $username, $realm, $password ) );
+
     my $A1_digest = $ctx->hexdigest;
 
-    $ctx = Digest::MD5->new;\r
-    $ctx->add( join( ':', $method, $uri ) );\r
+    $ctx = Digest::MD5->new;
+
+    $ctx->add( join( ':', $method, $uri ) );
+
     my $A2_digest = $ctx->hexdigest;
 
-    my $digest = Digest::MD5::md5_hex(\r
-        join( ':',\r
-            $A1_digest, $nonce, $qop ? ( $nc, $cnonce, $qop ) : (), $A2_digest )\r
-    );\r
+    my $digest = Digest::MD5::md5_hex(
+
+        join( ':',
+
+            $A1_digest, $nonce, $qop ? ( $nc, $cnonce, $qop ) : (), $A2_digest )
+
+    );
+
 
     $response = qq{Digest username="$username", realm="$realm", nonce="$nonce", uri="$uri", qop=$qop, nc=$nc, cnonce="$cnonce", response="$digest", opaque="$opaque"};
 }