Skip to content

Commit

Permalink
fix: fix the issue of incorrect handling of special horizon links on …
Browse files Browse the repository at this point in the history
…the Windows platform. (#825)
  • Loading branch information
overcat committed Nov 16, 2023
1 parent d5e96c2 commit cc599f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Release History
==============

### Pending
- fix: fix the issue of incorrect handling of special horizon links on the Windows platform. ([#825](https://github.com/StellarCN/py-stellar-base/pull/825))

### Version 9.0.0-beta1

Released on Nov 15, 2023
Expand Down
7 changes: 4 additions & 3 deletions stellar_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
They may change at any time, so please do not use them directly.
"""
import hashlib
import os
import re
from decimal import ROUND_FLOOR, Context, Decimal, Inexact
from typing import Dict, Optional, Sequence, Union
from urllib.parse import urlsplit, urlunsplit
from urllib.parse import urljoin, urlsplit, urlunsplit

from .asset import Asset
from .exceptions import Ed25519PublicKeyInvalidError, NoApproximationError
Expand Down Expand Up @@ -71,7 +70,9 @@ def urljoin_with_query(base: str, path: Optional[str]) -> str:
query = split_url.query
real_path = split_url.path
if path:
real_path = os.path.join(split_url.path, path)
if not real_path.endswith("/"):
real_path += "/"
real_path = urljoin(real_path, path)
url = urlunsplit(
(split_url.scheme, split_url.netloc, real_path, query, split_url.fragment)
)
Expand Down

0 comments on commit cc599f3

Please sign in to comment.