Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Authentication Issue with Double Slashes in URL #53

Closed

Conversation

cosineai[bot]
Copy link

@cosineai cosineai bot commented Aug 28, 2024

Summary

This PR addresses the issue where authentication fails when the URL contains double slashes (//). The problem was identified to be related to the handling of URL paths in the authentication process.

Changes

  • Added a utility function _remove_path_dot_segments to requests/utils.py to normalize URL paths by removing dot segments as per RFC 3986 Section 5.2.4.

Issue

The issue was causing a 400 Bad Request error when making authenticated requests to URLs with double slashes. This fix ensures that the URL path is correctly normalized before being used in the authentication process.

Testing

Tested with an Axis camera using the provided reproduction steps. The authentication now works as expected, and the request is processed successfully.

References

@JJIngram JJIngram closed this Aug 28, 2024
@JJIngram JJIngram deleted the cosine/fix/authentication-path-issue-uxn5is-1ukx86 branch August 28, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant