The URL Scheme the HTTP Message is incorrect when using proxy

Description

This only impacts CBL-C which is using LiteCore's BuiltInWebSocket. Currently when using proxy, the scheme or the target URL in the start line of the HTTP message is is ws or wss, which is not correct (See the example below). The scheme should be http or https.

Note: I have tested the issue with the mitmproxy.

Example 

Incorrect (Current)

GET ws://192.168.86.203:4984/db/_blipsync HTTP/1.1

Correct

GET http://192.168.86.203:4984/db/_blipsync HTTP/1.1

Activity

Show:

CB robot December 8, 2023 at 12:57 AM

Build couchbase-lite-c-3.2.0-29 contains couchbase-lite-core commit f72e418 with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-4390#icft=CBL-4390: URL Scheme HTTP Message is incorrect with proxy (https://couchbasecloud.atlassian.net/browse/CBL-4398#icft=CBL-4398 Port)

CB robot August 17, 2023 at 4:15 PM

Build couchbase-lite-ios-3.2.0-37 contains couchbase-lite-core commit f72e418 with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-4390#icft=CBL-4390: URL Scheme HTTP Message is incorrect with proxy (https://couchbasecloud.atlassian.net/browse/CBL-4398#icft=CBL-4398 Port)

CB robot July 17, 2023 at 8:04 PM

Build couchbase-lite-log-3.2.0-9 contains couchbase-lite-core commit f72e418 with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-4390#icft=CBL-4390: URL Scheme HTTP Message is incorrect with proxy (https://couchbasecloud.atlassian.net/browse/CBL-4398#icft=CBL-4398 Port)

CB robot July 17, 2023 at 5:25 PM

Build couchbase-lite-cblite-3.2.0-9 contains couchbase-lite-core commit f72e418 with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-4390#icft=CBL-4390: URL Scheme HTTP Message is incorrect with proxy (https://couchbasecloud.atlassian.net/browse/CBL-4398#icft=CBL-4398 Port)

CB robot July 5, 2023 at 11:43 AM

Build couchbase-lite-core-3.2.0-66 contains couchbase-lite-core commit f72e418 with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-4390#icft=CBL-4390: URL Scheme HTTP Message is incorrect with proxy (https://couchbasecloud.atlassian.net/browse/CBL-4398#icft=CBL-4398 Port)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created April 7, 2023 at 12:49 AM
Updated August 31, 2024 at 10:56 AM
Resolved March 18, 2024 at 4:42 PM
Instabug