Ignore:
Timestamp:
Apr 2, 2011, 3:50:07 AM (13 years ago)
Author:
adehnert
Message:
Useful error with unknown git vhost (Trac: #166)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/oursrc/execsys/ldapize.pl

    r849 r1798  
    66use Net::LDAP;
    77use Net::LDAP::Filter;
     8
     9sub report_error
     10{
     11    my $proto = shift;
     12    my $mesg = shift;
     13
     14    if ($proto eq 'git') {
     15        $mesg = "ERR \n  " . $mesg . "\n";
     16        my $len = length($mesg)+4;
     17        printf "%04x%s", $len, $mesg;
     18    } else {
     19        print $mesg;
     20    }
     21    exit 0;
     22}
    823
    924my $url = $ARGV[0];
     
    3146
    3247my $vhostEntry = $mesg->pop_entry;
     48if (!$vhostEntry)
     49{
     50    report_error($proto, "Could not find Host $hostname");
     51}
    3352my $vhostDirectory = $vhostEntry->get_value('scriptsVhostDirectory');
    3453
Note: See TracChangeset for help on using the changeset viewer.