BOSH connection to XMPP server through proxy fails
|Reported by:||hgiddens||Owned by:||darkrain42|
|Milestone:||Patches Needing Improvement||Component:||XMPP|
Connecting to an XMPP server via BOSH through a HTTP proxy that presumably doesn't support pipelining fails with the message "Lost connection with server: Bad file descriptor". stracing pidgin reveals that write is being called with a file descriptor of -1:
write(-1, "POST /http-bind/ HTTP/1.1\r\nHost:"..., 393) = -1 EBADF
This seems to be caused by the pipelining-not-supported path in http_connection_disconnected in bosh.c which calls http_connection_connect on conn->bosh->connections before trying to reconnect conn (i.e., conn->bosh->connections). The connection callback for connections is then called before the callback for connections, and when jabber_bosh_connection_boot is called, it passes the uninitialised connections to http_connection_send_request.
The attached patch fixes this by reconnecting connections before connections.
Change History (8)
Changed 7 years ago by hgiddens
comment:1 Changed 7 years ago by QuLogic
- Component changed from unclassified to XMPP
- Milestone set to Patches Needing Review
- Owner changed from rekkanoryo to darkrain42
comment:4 Changed 6 years ago by darkrain42
- Milestone changed from Patches Needing Review to Patches Needing Improvement
- Status changed from new to pending