ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/http.ext
(Generate patch)

Comparing deliantra/server/ext/http.ext (file contents):
Revision 1.4 by root, Tue Oct 30 18:36:42 2012 UTC vs.
Revision 1.5 by root, Tue Oct 30 19:19:39 2012 UTC

62 $self->respond ("404 type $type not served yet"); 62 $self->respond ("404 type $type not served yet");
63 } else { 63 } else {
64 if ($type == 0) { # faces 64 if ($type == 0) { # faces
65 $self->respond ("200 OK", (cf::face::get_data $idx, 1), 65 $self->respond ("200 OK", (cf::face::get_data $idx, 1),
66 "content-type: image/png\015\012" 66 "content-type: image/png\015\012"
67 . "cache-control: max-age=864000\015\012" 67 . "cache-control: max-age=8640000\015\012"
68 . "etag: \"0\"\015\012" 68 . "etag: \"0\"\015\012"
69 ); 69 );
70 } else { 70 } else {
71 $self->respond ("404 type $type not served yet"); 71 $self->respond ("404 type $type not served yet");
72 } 72 }
75 my $body = "<html><body>"; 75 my $body = "<html><body>";
76 76
77 for (1 .. cf::face::faces_size - 1) { 77 for (1 .. cf::face::faces_size - 1) {
78 next if cf::face::get_type $_; 78 next if cf::face::get_type $_;
79 my $name = cf::face::get_chksum $_, 1; 79 my $name = cf::face::get_chksum $_, 1;
80 $body .= "<img src='" . (unpack "H*", $name) . "'><br>"; 80 $body .= "img src='" . (unpack "H*", $name) . "'<br>";
81 } 81 }
82 82
83 $body .= "</body></html>"; 83 $body .= "</body></html>";
84 84
85 $self->respond ("200 OK", $body, "Content-Type: text/html\015\012"); 85 $self->respond ("200 OK", $body, "Content-Type: text/html\015\012");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines