Skip to content

Commit 06d3708

Browse files
committed
fix: http proxy
1 parent 48b40f3 commit 06d3708

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

cli.py renamed to http-proxy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ async def pc_data(data):
133133
request = json.loads(data)
134134
log.warning('peer http tunnel request: \n%r', request)
135135
response_content = await _fetch(**request)
136-
log.warning('Sending response: \n%r', response_content)
136+
log.warning('Answering request: \n%r '
137+
'response: \n%r',
138+
request, response_content)
137139
await peerConnection.send(response_content)
138140

139141
@peerConnection.on(ConnectionEventType.Close)

run-dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ if [ 2 -gt $SETUP_PY_MOD ] || [ 2 -gt $SETUP_CFG_MOD ]; then
2020
pip3 install --editable src
2121
fi
2222

23-
python3 $SCRIPTPATH/cli.py
23+
python3 $SCRIPTPATH/http-proxy.py

src/peerjs/dataconnection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async def send(self, data, chunked: bool = False) -> None:
281281
# else:
282282
# self._bufferedSend(blob)
283283
else:
284-
log.warning('DataConnection sending data: \n%r', data)
284+
# log.debug('DataConnection sending data: \n%r', data)
285285
await self._bufferedSend(data)
286286

287287
async def _bufferedSend(self, msg: any) -> None:

0 commit comments

Comments
 (0)