class_docstr: Adds support for HTTP 'Range' requests to SimpleHTTPRequestHandler
  
  The approach is to:
  - Override send_head to look for 'Range' and respond appropriately.
  - Override copyfile to only transmit a range when requested.
code: def send_head(self):
      if "Range" not in self.headers:
          self.range = None
          return SimpleHTTPRequestHandler.send_head(self)
      try:
          self.range = parse_byte_range(self.headers["Range"])
      except ValueError as e:
          self.send_error(400, "Invalid byte range")
          return None
      first, last = self.range
  
      # Mirroring SimpleHTTPServer.py here
      path = self.translate_path(self.path)
      f = None
      ctype = self.guess_type(path)
      try:
          f = open(path, "rb")
      except IOError:
          self.send_error(404, "File not found")
          return None
  
      fs = os.fstat(f.fileno())
      file_len = fs[6]
      if first >= file_len:
          self.send_error(416, "Requested Range Not Satisfiable")
          return None
  
      self.send_response(206)
      self.send_header("Content-type", ctype)
      self.send_header("Accept-Ranges", "bytes")
  
      if last is None or last >= file_len:
          last = file_len - 1
      response_length = last - first + 1
  
      self.send_header(
          "Content-Range", "bytes %s-%s/%s" % (first, last, file_len)
      )
      self.send_header("Content-Length", str(response_length))
      self.send_header(
          "Last-Modified", self.date_time_string(fs.st_mtime)
      )
      self.end_headers()
      return f
  
file_path: rasterio/tests/rangehttpserver.py
imports: import os
  import re
label_desc: Use image node_id 1 for calling the RangeRequestHandler obj's underlying member method code with example usage: obj.send_head() and returns: f, SimpleHTTPRequestHandler, None, None, None