Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d7ed0ce8749d4cafc65970f662bf459b8ea43f30
      
https://github.com/WebKit/WebKit/commit/d7ed0ce8749d4cafc65970f662bf459b8ea43f30
  Author: Roy Reapor <rrea...@apple.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M Websites/perf.webkit.org/tools/js/remote.js
    M Websites/perf.webkit.org/tools/run-tests.py
    M Websites/perf.webkit.org/unit-tests/tools-js-remote-tests.js

  Log Message:
  -----------
  Websites/perf.webkit.org/tools/js/remote.js should support different 
"Authorization" schemes
https://bugs.webkit.org/show_bug.cgi?id=263210
rdar://117033333

Reviewed by Dewei Zhu.

The `Authorization` header is now handled outside the `http.request` object. 
`server.auth` is not passed as `http.request` option.

The `NodeRemoteAPI` (aka `RemoteAPI`) now sets the `Authorization` header 
explicilty if `server.auth` is defined. If a scheme is specified it sets the 
`Authorization` header value to `<scheme> <parameter>`. Otherwise, it is 
assumed to be basic authentication and sets the `Authorization` header value to 
`Basic <username>:<password>`. This preserves backwards compatibility.

Added unit tests. `run-tests.py` will look for Mocha CLI  in another path.

* Websites/perf.webkit.org/tools/js/remote.js:
(NodeRemoteAPI.prototype.configure):
(NodeRemoteAPI.prototype.sendHttpRequest):
* Websites/perf.webkit.org/tools/run-tests.py:
(main):
* Websites/perf.webkit.org/unit-tests/tools-js-remote-tests.js:
(assert.doesNotThrow):
(assert.throws):

Canonical link: https://commits.webkit.org/269771@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to