Commit f04e576
committed
Update Appium.js
Fixed #4865
Enhancement: Prevent Double Slashes in Appium Endpoint URL
Overview:
This update improves the _buildAppiumEndpoint() function by ensuring the path does not end with a trailing slash. This prevents potential issues with double slashes when constructing the Appium REST API endpoint URL.
Changes:
Introduced normalizedPath, which removes a trailing slash from path using .replace(/\/$/, '').
Updated the return statement to use normalizedPath instead of path.
Benefits:
✅ Prevents malformed URLs with double slashes.
✅ Improves consistency and reliability of API requests.
✅ Enhances code readability and maintainability.1 parent 52b6e74 commit f04e576
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
386 | 388 | | |
387 | | - | |
| 389 | + | |
388 | 390 | | |
389 | 391 | | |
390 | 392 | | |
| |||
0 commit comments