socket.jsm based protocols don't handle HTTP proxies

RESOLVED FIXED in 1.2

Status

Chat Core
XMPP
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Instantbot, Assigned: florian)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [1.2-wanted], URL)

(Reporter)

Description

4 years ago
*** Original post on bio 1347 by Martin <keso AT kotelna.sk> at 2012-03-20 14:43:00 UTC ***

Despite of having setup http proxy Gtalk, IRC and Facebook doesn't accept this.

ICQ account accept this setting.

I have setup HTTP proxy on port 80 for all my accounts except one. Stable version of instantbird connect without any problem. 

XMPP accounts:
Instantbird during connection hangs on "Initializing stream ... " then it says only "Error: Received unexpected data"

Error console says:
Error: parse-fatal-error: XML Parsing Error: not well-formed
Location: about:blank
Line Number 1, Column 5:
Source File: resource:///modules/xmpp-session.jsm
Line: 222
Source Code:
xmpp-session

IRC account - error console:
Warning: Unhandled IRC message: HTTP/1.1 400 Bad Request
Source File: jar:file:///C:/Program%20Files/Instantbird/omni.ja!/components/irc.js
Line: 331
Source Code:
irc

Warning: Unhandled IRC message: Connection: close
Source File: jar:file:///C:/Program%20Files/Instantbird/omni.ja!/components/irc.js
Line: 331
Source Code:
irc
*** Original post on bio 1347 at 2012-03-20 14:54:03 UTC ***

I wonder if we don't handle HTTP proxies at all in the socket.jsm code. I think this isn't automagically handled by Necko for us. The code our code is based off of [2], doesn't seem to support proxies, but it was added by inspection of ChatZilla code [1]. Perhaps we missed a bit?

I know some of the proxy code was tested, did we test with an HTTP proxy at all?

[1] http://mxr.mozilla.org/comm-central/source/mozilla/extensions/irc/js/lib/connection-xpcom.js#364
[2] http://www.mozdev.org/source/browse/msnmsgr/src/content/socket.js?rev=1.5
(Assignee)

Comment 2

4 years ago
*** Original post on bio 1347 at 2012-03-20 15:43:27 UTC ***

I don't see why an HTTP proxy could be used for IRC/XMPP (except if using BOSH for XMPP). Socks proxies work.
*** Original post on bio 1347 at 2012-04-17 20:24:22 UTC ***

Adding a link to the corresponding Mozilla bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

4 years ago
Whiteboard: [1.2-wanted]
(Assignee)

Updated

4 years ago
Summary: XMPP doesn't accept proxy settings → socket.jsm based protocols shouldn't attempt to use HTTP proxies
*** Original post on bio 1347 at 2012-07-11 17:38:25 UTC ***

So from something EionRobb said on IRC [1], it looks like we could attempt to use HTTP CONNECT in these situations [2]. I remembered some code seeming to do something like this...and found it again [3]. Wikipedia also has some information [4]. And following a bunch of links, it seems to be defined in [5].

[1] http://log.bezut.info/instantbird/120709/#m543
[2] http://tools.ietf.org/html/rfc2616#section-9.9
[3] https://bitbucket.org/lordblackfox/papaya/src/761956e6a051/chrome/xmpp4js/socket.jsm#cl-216
[4] http://en.wikipedia.org/wiki/HTTP#Request_methods
[5] http://tools.ietf.org/html/draft-luotonen-web-proxy-tunneling-01
OS: Windows XP → All
Hardware: x86 → All
Summary: socket.jsm based protocols shouldn't attempt to use HTTP proxies → socket.jsm based protocols don't handle HTTP proxies
(Assignee)

Comment 5

4 years ago
*** Original post on bio 1347 at 2012-07-31 10:45:35 UTC ***

Fixed by ignoring HTTP proxies for 1.2: https://hg.instantbird.org/instantbird/rev/02d93fefd2e2

If someone is interested in us supporting HTTP proxies for non-HTTP protocols, and is willing to implement it / help testing it, please feel free to open another bug for this enhancement request.
Assignee: nobody → florian
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.2
Blocks: 955075
You need to log in before you can comment on or make changes to this bug.