title: bayeux long polling comet ~ failed while using Proxy
body: <p>I am trying to use Streaming API in SalesForce, which is basically implemented using Comet / Long Polling technology. In client, we're using Java with jetty-http , bayeux-api , cometd-java-client</p>
  
  <p>Everything works perfectly if we run the application without proxy.
  But if client is using network proxy</p>
  
  <p>A. it is able to do user authentication</p>
  
  <p>B. long polling handshake is succesfull</p>
  
  <p>C. meta/connect initially having 402 error (refer to below log) but eventually successful</p>
  
  <p>D. <strong>NEVER get any response from server side</strong></p>
  
  <p>Any thought what's happening here, and why proxy caused this, even if all the HTTP connection request in A, B, C above are successful?</p>
  
  <pre><code>[12:23:50.504-HttpClient-21][CHANNEL:META_CONNECT]: {"id":"5","error":"402::Unknown client","successful":false,"advice":{"interval":500,"reconnect":"handshake"},"channel":"/meta/connect","clientId":"jj1ajqshe3lkkpp1rsiy5g30ppey"}
  [12:23:50.504-HttpClient-21][CHANNEL:META_CONNECT] Error : 402::Unknown client
  [12:23:51.760-HttpClient-23][CHANNEL:META_HANDSHAKE]: {"id":"6","minimumVersion":"1.0","supportedConnectionTypes":["long-polling"],"successful":true,"channel":"/meta/handshake","clientId":"ingkpdlgu6uy43m06ei30spqpl","version":"1.0"}
  [12:23:53.170-HttpClient-19][CHANNEL:META_CONNECT]: {"id":"7","error":"402::Unknown client","successful":false,"advice":{"interval":500,"reconnect":"handshake"},"channel":"/meta/connect","clientId":"ingkpdlgu6uy43m06ei30spqpl"}
  [12:23:53.170-HttpClient-19][CHANNEL:META_CONNECT] Error : 402::Unknown client
  [12:23:54.408-HttpClient-22][CHANNEL:META_HANDSHAKE]: {"id":"8","minimumVersion":"1.0","supportedConnectionTypes":["long-polling"],"successful":true,"channel":"/meta/handshake","clientId":"fr1r22f6au89xpm1lbucrp26fs27","version":"1.0"}
  [12:24:00.757-HttpClient-19][CHANNEL:META_CONNECT]: {"id":"9","successful":true,"advice":{"interval":0,"reconnect":"retry","timeout":110000},"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
  [12:24:07.051-HttpClient-19][CHANNEL:META_CONNECT]: {"id":"10","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
  [12:24:13.348-HttpClient-22][CHANNEL:META_CONNECT]: {"id":"11","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
  [12:24:19.643-HttpClient-18][CHANNEL:META_CONNECT]: {"id":"12","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
  [12:24:25.935-HttpClient-18][CHANNEL:META_CONNECT]: {"id":"13","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
  [12:24:33.429-HttpClient-24][CHANNEL:META_CONNECT]: {"id":"14","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
  </code></pre>