Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 644e607

Browse filesBrowse files
authored
Remove trailing colon when parsing the protocol from URL (#1778)
* Remove trailing colon when parsing the protocol from URL * Fix bug
1 parent 1d342cd commit 644e607
Copy full SHA for 644e607

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎arduino-ide-extension/src/common/protocol/config-service.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/common/protocol/config-service.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ export namespace Network {
6060
try {
6161
// Patter: PROTOCOL://USER:PASS@HOSTNAME:PORT/
6262
const { protocol, hostname, password, username, port } = new URL(raw);
63+
// protocol in URL object contains a trailing colon
64+
const newProtocol = protocol.replace(/:$/, '');
6365
return {
64-
protocol,
66+
protocol: newProtocol,
6567
hostname,
6668
password,
6769
username,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.