[PR #16096] [MERGED] fix: properly handle full URLs in form_data.path #10827

Closed
opened 2025-11-11 19:14:53 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/16096
Author: @gkkachi
Created: 7/28/2025
Status: Merged
Merged: 7/31/2025
Merged by: @tjbck

Base: devHead: dev


📝 Commits (1)

  • 0a8f482 fix: properly handle full URLs in form_data.path

📊 Changes

2 files changed (+20 additions, -11 deletions)

View changed files

📝 backend/open_webui/routers/configs.py (+6 -2)
📝 backend/open_webui/utils/tools.py (+14 -9)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: This pull request targets the dev branch.
  • Description: Provided a concise description of the changes made in this pull request.
  • Changelog: A changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Documentation will be updated as needed in Open WebUI Docs, or other documentation sources.
  • Dependencies: No new dependencies introduced.
  • Testing: Sufficient tests have been written and run to validate the changes.
  • Code review: Self-review has been performed for adherence to coding standards.
  • Prefix: The pull request title is prefixed as follows: fix: Properly handle full URLs in form_data.path and tool server paths

Changelog Entry

Description

  • This pull request fixes a bug in URL construction logic. When form_data.path contains a full URL (i.e., it includes '://'), the backend now uses this value directly instead of concatenating it with form_data.url. This ensures valid URL usage for both relative and absolute paths.

Added

  • None.

Changed

  • In backend/open_webui/routers/configs.py, updated URL construction logic to check for and use full URLs in form_data.path.

Deprecated

  • None.

Removed

  • None.

Fixed

  • Fixed an issue where a full URL in form_data.path would be incorrectly concatenated with form_data.url, resulting in an invalid URL.

Security

  • None.

Breaking Changes

  • None.

Additional Information

Screenshots or Videos

  • N/A

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/open-webui/open-webui/pull/16096 **Author:** [@gkkachi](https://github.com/gkkachi) **Created:** 7/28/2025 **Status:** ✅ Merged **Merged:** 7/31/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (1) - [`0a8f482`](https://github.com/open-webui/open-webui/commit/0a8f48226470cbb6426f9d24f43d8bda2ba6b0c4) fix: properly handle full URLs in form_data.path ### 📊 Changes **2 files changed** (+20 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/configs.py` (+6 -2) 📝 `backend/open_webui/utils/tools.py` (+14 -9) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [x] **Target branch:** This pull request targets the `dev` branch. - [x] **Description:** Provided a concise description of the changes made in this pull request. - [x] **Changelog:** A changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Documentation will be updated as needed in [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources. - [ ] **Dependencies:** No new dependencies introduced. - [x] **Testing:** Sufficient tests have been written and run to validate the changes. - [x] **Code review:** Self-review has been performed for adherence to coding standards. - [x] **Prefix:** The pull request title is prefixed as follows: **fix**: Properly handle full URLs in form_data.path and tool server paths # Changelog Entry ### Description - This pull request fixes a bug in URL construction logic. When `form_data.path` contains a full URL (i.e., it includes '://'), the backend now uses this value directly instead of concatenating it with `form_data.url`. This ensures valid URL usage for both relative and absolute paths. ### Added - None. ### Changed - In `backend/open_webui/routers/configs.py`, updated URL construction logic to check for and use full URLs in `form_data.path`. ### Deprecated - None. ### Removed - None. ### Fixed - Fixed an issue where a full URL in `form_data.path` would be incorrectly concatenated with `form_data.url`, resulting in an invalid URL. ### Security - None. ### Breaking Changes - None. --- ### Additional Information - Related commit: 2c7ccc69fe614b65bb584b53b89c3eee2eac894b ### Screenshots or Videos - N/A ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 19:14:53 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#10827