~ubuntu-branches/ubuntu/edgy/libwww-perl/edgy

« back to all changes in this revision

Viewing changes to lib/HTTP/Headers/ETag.pm

  • Committer: Bazaar Package Importer
  • Author(s): Jay Bonci
  • Date: 2005-02-13 18:45:32 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050213184532-67qvopi4wre3010u
Tags: 5.803-4
* Make GET/POST/HEAD symlinks (Closes: #294597)
* lwp-requests now honors -b when dumping links (Closes: #294595)
  - Thanks to giuseppe bonacci for the patch
* Moved symlinks to a libwww-perl.links file

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
use strict;
4
4
use vars qw($VERSION);
5
 
$VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
 
5
$VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
6
6
 
7
7
require HTTP::Date;
8
8
 
32
32
        my $new = shift;
33
33
        if (!defined $new) {
34
34
            $self->remove_header("If-Range");
35
 
        } elsif ($new =~ /^\d+$/) {
 
35
        }
 
36
        elsif ($new =~ /^\d+$/) {
36
37
            $self->_date_header("If-Range", $new);
37
 
        } else {
 
38
        }
 
39
        else {
38
40
            $self->_etags("If-Range", $new);
39
41
        }
40
42
    }
69
71
            my $etag = "";
70
72
            if (s/^\s*(\"[^\"\\]*(?:\\.[^\"\\]*)*\")//) {
71
73
                push(@res, "$weak$1");
72
 
            } elsif (s/^\s*,//) {
 
74
            }
 
75
            elsif (s/^\s*,//) {
73
76
                push(@res, qq(W/"")) if $weak;
74
 
            } elsif (s/^\s*([^,\s]+)//) {
 
77
            }
 
78
            elsif (s/^\s*([^,\s]+)//) {
75
79
                $etag = $1;
76
80
                $etag =~ s/([\"\\])/\\$1/g;
77
81
                push(@res, qq($weak"$etag"));
78
 
            } elsif (s/^\s+// || !length) {
 
82
            }
 
83
            elsif (s/^\s+// || !length) {
79
84
                push(@res, qq(W/"")) if $weak;
80
 
            } else {
 
85
            }
 
86
            else {
81
87
                die "This should not happen: '$_'";
82
88
            }
83
89
        }