code: def get_path_and_qs(self):
          
          path_parts = self.path.split("?", 1)
  
          if len(path_parts) > 1:
              qs = path_parts[1].split("#", 1)[0]
          else:
              qs = ""
  
          path = path_parts[0].split("#", 1)[0]
          path = posixpath.normpath(urllib.unquote(path))
  
          qs_values = self.parse_qs( qs )
          if qs_values is None:
              return {'error': 'Failed to parse query string'}
  
          parts = path.strip('/').split('/')
  
          return {'path': path, 'qs_values': qs_values, 'parts': parts}
docs: Parse and obtain the path and query values.
          We don't care about fragments.
  
          Return {'path': ..., 'qs_values': ...} on success
          Return {'error': ...} on error