… | |
… | |
97 | } else { |
97 | } else { |
98 | $self->respond ("200 OK", $data, (content_type $data) . $cache_headers); |
98 | $self->respond ("200 OK", $data, (content_type $data) . $cache_headers); |
99 | } |
99 | } |
100 | |
100 | |
101 | } elsif (my $idx = (cf::face::find "res/http$uri") || (cf::face::find "res/http${uri}index.html")) { |
101 | } elsif (my $idx = (cf::face::find "res/http$uri") || (cf::face::find "res/http${uri}index.html")) { |
|
|
102 | # TODO: temp redirect to face itself, for caching, or use etag (shudder) |
102 | my $data = cf::face::get_data $idx, 1; |
103 | my $data = cf::face::get_data $idx, 1; |
103 | $self->respond ("200 OK", $data, (content_type $data) . $cache_headers); |
104 | $self->respond ("200 OK", $data, (content_type $data) . $cache_headers); |
104 | |
105 | |
105 | } elsif (cf::face::find "res/http$uri/index.html") { |
106 | } elsif (cf::face::find "res/http$uri/index.html") { |
106 | $self->respond ("302 dirslash", "", "location: $uri/\015\012"); |
107 | $self->respond ("302 dirslash", "", "location: $uri/\015\012"); |