[PR #435] [MERGED] Allow use of HTTP proxies listening on port 80 #923

Closed
opened 2026-02-27 20:00:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/435
Author: @Malvineous
Created: 2/16/2020
Status: Merged
Merged: 2/27/2020
Merged by: @sashahilton00

Base: devHead: patch-1


📝 Commits (1)

  • 63cc846 Allow use of HTTP proxies listening on port 80

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/main.rs (+1 -1)

📄 Description

Since port 80 is the default port for the HTTP protocol, url.port() returns None, causing an "invalid proxy" message. Using port_or_known_default() will only return None if the both the port has been omitted and an unknown protocol has been specified.

You can verify this like so:

$ librespot --proxy http://1.2.3.4:80
thread 'main' panicked at 'Invalid proxy url, only urls on the format "http://host:port" are allowed: "http://1.2.3.4/"', src/main.rs:291:33

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/435 **Author:** [@Malvineous](https://github.com/Malvineous) **Created:** 2/16/2020 **Status:** ✅ Merged **Merged:** 2/27/2020 **Merged by:** [@sashahilton00](https://github.com/sashahilton00) **Base:** `dev` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`63cc846`](https://github.com/librespot-org/librespot/commit/63cc846a104ea6bde57c0d45fbf328e179c28fcd) Allow use of HTTP proxies listening on port 80 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/main.rs` (+1 -1) </details> ### 📄 Description Since port 80 is the default port for the HTTP protocol, `url.port()` returns `None`, causing an "invalid proxy" message. Using `port_or_known_default()` will only return `None` if the both the port has been omitted and an unknown protocol has been specified. You can verify this like so: ``` $ librespot --proxy http://1.2.3.4:80 thread 'main' panicked at 'Invalid proxy url, only urls on the format "http://host:port" are allowed: "http://1.2.3.4/"', src/main.rs:291:33 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#923
No description provided.