Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3589

Unknown compressor does not log a warning

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Configuration
    • None

    Description

      According to the Wire Compression specification:

      Unknown compressors MUST yield a warning, as per the Connection String specification, and MUST NOT be included in the handshake.

      The .NET/C# driver ignores unknown compressors, but does not log a warning as required by the spec.

      To reproduce:

      • Create a MongoClient using the connection string mongodb://localhost:27017/test?compressors=snoopy
      • Observe that no warning is logged even if a trace source is configured

      For comparison, consider the following Python output:

      >>> from pymongo import MongoClient
      >>> client = MongoClient("mongodb://localhost:37017/test?compressors=snoopy")
      /usr/local/lib/python3.9/site-packages/pymongo/compression_support.py:55: UserWarning: Unsupported compressor: snoopy
        warnings.warn("Unsupported compressor: %s" % (compressor,))
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: