noisyboiler / wampy

Websocket RPC and Pub/Sub for Python applications and microservices
Mozilla Public License 2.0
127 stars 24 forks source link

Double slash in path #67

Closed dmugtasimov closed 5 years ago

dmugtasimov commented 6 years ago

When I run

from wampy.peers import Client

client = Client()
client.start()

I get

2018-10-06 15:25:21,280 DEBUG connection headers: ['GET //8080 HTTP/1.1', 'Host: localhost:8080', 'Upgrade: websocket', 'Connection: Upgrade', 'Sec-WebSocket-Key: pTTOyGC/QjClWaGYIlFaYw==', 'Origin: ws://localhost:8080', 'Sec-WebSocket-Version: 13', 'Sec-WebSocket-Protocol: wamp.2.json']

Should not it be GET / instead of GET //8080?

For

from wampy.peers.clients import Client
from wampy.peers.routers import Crossbar

with WampyApp(router=Crossbar(url='ws://127.0.0.1:8080/ws', config_path=config_path),
              roles=roles, message_handler=TicketMessageHandler('ticket')) as client:
    pass

I get

2018-10-06T15:26:13+0300 [Router      10075 crossbar.router.protocol.WampWebSocketServerProtocol] received HTTP request:

b'GET //ws HTTP/1.1\r\nHost: 127.0.0.1:8080\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: 9Zby3RqBSLWA3Ovh2NLDJA==\r\nOrigin: ws://127.0.0.1:8080\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Protocol: wamp.2.json\r\n\r\n'

on Crossbar side. Should it be GET /ws instead of GET //ws?

Please, let me know if you can't grasp the issue from the above description. I will prepare a full fledged example.

dmugtasimov commented 5 years ago

@noisyboiler Hi! Have you reviewed this one?

noisyboiler commented 5 years ago

next on my radar!

noisyboiler commented 5 years ago

sorry this took so long to address. i do appreciate these things being raised. 👍