~int80h/gemserv

ref: c7677ce2f28d5013938ac2748d74f10fdddfb55c gemserv/cgi-scripts/scgi/scgi.pl -rwxr-xr-x 426 bytes
c7677ce2int 80h Added .build.yml 1 year, 17 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/local/bin/perl


use SCGI;
use IO::Socket;
 
my $socket = IO::Socket::INET->new(Listen => 5, ReuseAddr => 1, LocalPort => 4001)
  	or die "cannot bind to port 4001: $!";
   
my $scgi = SCGI->new($socket, blocking => 1);
    
while (my $request = $scgi->accept) {
	$request->read_env;
	read $request->connection, my $body, $request->env->{CONTENT_LENGTH};
	print { $request->connection } "20\ttext/gemini\r\nperl\n";
	}