Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-778

Document URI quoting rules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8, 3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 10

      Description

      MongoDB itself can handle passwords containing a slash without problems. Unfortunately this breaks in pymongo's URI parser:

      >>> from pymongo import uri_parser
      >>> uri_parser.parse_uri('mongodb://user:pass/word@127.0.0.1')
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "pymongo/uri_parser.py", line 296, in parse_uri
          nodes = split_hosts(hosts, default_port=default_port)
        File "pymongo/uri_parser.py", line 236, in split_hosts
          nodes.append(parse_host(entity, port))
        File "pymongo/uri_parser.py", line 138, in parse_host
          raise ConfigurationError("Port number must be an integer.")
      pymongo.errors.ConfigurationError: Port number must be an integer.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: