fernandospr / java-wns

Java Service Provider to send push notifications to Windows 8/10 devices through WNS
BSD 3-Clause "New" or "Revised" License
28 stars 21 forks source link

"500 Internal Server Error" when using proxy properties #18

Open abarysiuk opened 8 years ago

abarysiuk commented 8 years ago

We've been using wns lib for quite a time and everything was fine until we needed proxy server. Simply passing proxy setting to the service constructor causes 500 error to be returned. After some investigation i found that "Transfer-Encoding: chunked" header is the root cause of this error. As far as i understand java-wns uses ApacheConnectorProvider under the hood, which might add this header if proxy properties are not empty.

According Jersey docs only default HttpUrlConnectorProvider restrict the use of some headers, including 'Transfer-Encoding'.

The problem is that there is no way to configure Jersey client and e.g. to use other connection provider.

abarysiuk commented 8 years ago

We use 1.4 version