-
Notifications
You must be signed in to change notification settings - Fork 298
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
Replicator isn't including Authorization: header in requests, so it gets unnecessary 401s #1127
Comments
This appears to be a bug in Apple's HTTP client implementation in CFNetwork. I've made a very small test case that reproduces it, and filed a bug report with Apple. (rdar://24753862). We can work around this by directly adding an Authorization: header to every request. I've got a POC working but need to think about the details and edge cases some more before committing. |
...when we have a CBLPasswordAuthorizer. Also modified CBLRemoteRequest to never use the proposed credential, since it might be for a different login to the same server. Fixes #1127
...when we have a CBLPasswordAuthorizer. Also modified CBLRemoteRequest to never use the proposed credential, since it might be for a different login to the same server. This is equivalent to 3e5eaef on the master branch. Not directly cherry-picked due to all the changes in CBLRemoteRequest, but I copied/ pasted the individual hunks. Fixes #1127
Fixed on branch |
Merged into |
...when we have a CBLPasswordAuthorizer. Also modified CBLRemoteRequest to never use the proposed credential, since it might be for a different login to the same server. This is equivalent to 3e5eaef on the master branch. Not directly cherry-picked due to all the changes in CBLRemoteRequest, but I copied/ pasted the individual hunks. Fixes #1127
The replicator isn't sending request credentials efficiently. When using HTTP Basic auth, it should only be getting one 401 response per session; after that it should be proactively including the Authorization: header in subsequent requests. But it isn't, so it's sending every request twice. This is obviously bad for performance.
The text was updated successfully, but these errors were encountered: