Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1337

Simplify the proxy handling behavior

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: Proxy

      Description

      There are several improvements to imagine for the proxy handling.

      First, as the password is of type bytes, trying to dump the proxy settings will crash Drive:

      Traceback (most recent call last):
        File "nxdrive/gui/api.py", line 748, in get_proxy_settings
          return self._json(result)
        File "nxdrive/gui/api.py", line 74, in _json
          return json.dumps(obj, default=self._json_default)
        File "python3.6/json/__init__.py", line 238, in dumps
          **kw).encode(obj)
        File "python3.6/json/encoder.py", line 199, in encode
          chunks = self.iterencode(o, _one_shot=True)
        File "python3.6/json/encoder.py", line 257, in iterencode
          return _iterencode(o, 0)
      ValueError: Circular reference detected
      

      The fix is simple: decode the password when loading the proxy settings.

      Second, when setting a username and password for the manual proxy, credentials are not taken into account.

      We could fix those issues by reviewing how the manual proxy is handled. Also the resulting code would be simpler to read and understand.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 30 minutes
                3h 30m