Parent Directory | Revision Log
Branch for updates
1 | #!/usr/bin/perl |
2 | |
3 | use IO::Socket; |
4 | use MDK::Common; |
5 | |
6 | my $root = "/var/lib/tftpboot/X86PC/linux/pxelinux.cfg/profiles"; |
7 | my $file = scalar <> =~ m!^GET (.*?) HTTP/[0-9.]+! && "$root/$1"; |
8 | |
9 | sub output_http { |
10 | my ($code, @msg) = @_; |
11 | print join("\015\012" => "HTTP/1.0 $code", "", ""); |
12 | print @msg; |
13 | } |
14 | |
15 | if (defined $file && -r $file) { |
16 | output_http("200 OK", cat_($file)); |
17 | } else { |
18 | output_http("404 Not Found"); |
19 | } |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.30 |