]> git.etc.gen.nz Git - spong.git/commitdiff
remove trailingg spaces properly
authorJan Willamowius <jan@willamowius.de>
Wed, 14 Sep 2005 10:17:50 +0000 (10:17 +0000)
committerJan Willamowius <jan@willamowius.de>
Wed, 14 Sep 2005 10:17:50 +0000 (10:17 +0000)
src/lib/Spong/Network/plugins/check_http

index 25e43baecc650e1a481b3970d271e92240676c33..7db7d4dc7f90f2eea2a7f7bef2c4537cf6302310 100755 (executable)
@@ -30,7 +30,7 @@ sub check_http {
          # Parse the URL into it's components
          $url =~ s|^([A-Z]+ )?http://||;  # Remove the protocol id if present
          $method = $1 || "HEAD";
-         chop($method);                                # remove trailing space
+         $method =~ s/\w$//;   # remove trailing spaces
          my($hpart,$urlpath) = ( $url =~ m|^([^/]+)(/.*)| );
          my($hname,$port) = split(/:/,$hpart);
          $port = 80 if ! $port;