play.libs.WS using proxy

Bug #432461 reported by omillien
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Incomplete
Undecided
Sébastien Crème

Bug Description

I would like to use WS to connect to an url but i am behind a proxy and it doesn't seem to work. Can add a support of authenticated proxy as it works with java.net.URLConnection

Changed in play:
assignee: nobody → Nicolas (nicolas-lunatech)
Revision history for this message
Nicolas Leroux (nicolas-lunatech) wrote :

This is already done in the lp:play branch as far as I can see.

Changed in play:
assignee: Nicolas (nicolas-lunatech) → nobody
assignee: nobody → Sébastien Crème (sebastien-creme)
status: New → Fix Committed
Revision history for this message
Sébastien Crème (sebastien-creme) wrote : Re: [Bug 432461] Re: play.libs.WS using proxy

Yes it should work now with proxy info in play application.conf:

# WS configuration
# ~~~~~
# If you need to set proxy params for WS requests
http.proxyHost = localhost
http.proxyPort = 3128
http.proxyUser = jojo
http.proxyPassword = jojo

try it and keep us updated

Sébastien

Le 24 sept. 09 à 14:49, Nicolas a écrit :

> This is already done in the lp:play branch as far as I can see.
>
> ** Changed in: play
> Assignee: Nicolas (nicolas-lunatech) => (unassigned)
>
> ** Changed in: play
> Assignee: (unassigned) => Sébastien Crème (sebastien-creme)
>
> ** Changed in: play
> Status: New => Fix Committed
>
> --
> play.libs.WS using proxy
> https://bugs.launchpad.net/bugs/432461
> You received this bug notification because you are a member of play
> framework developers, which is subscribed to play framework.

Revision history for this message
Guillaume Bort (guillaume-bort) wrote :

It should be added (with comments) in the default application.conf

On 24 sept. 2009, at 16:00, Sébastien Crème
<email address hidden> wrote:

> Yes it should work now with proxy info in play application.conf:
>
> # WS configuration
> # ~~~~~
> # If you need to set proxy params for WS requests
> http.proxyHost = localhost
> http.proxyPort = 3128
> http.proxyUser = jojo
> http.proxyPassword = jojo
>
> try it and keep us updated
>
> Sébastien
>
> Le 24 sept. 09 à 14:49, Nicolas a écrit :
>
>> This is already done in the lp:play branch as far as I can see.
>>
>> ** Changed in: play
>> Assignee: Nicolas (nicolas-lunatech) => (unassigned)
>>
>> ** Changed in: play
>> Assignee: (unassigned) => Sébastien Crème (sebastien-creme)
>>
>> ** Changed in: play
>> Status: New => Fix Committed
>>
>> --
>> play.libs.WS using proxy
>> https://bugs.launchpad.net/bugs/432461
>> You received this bug notification because you are a member of play
>> framework developers, which is subscribed to play framework.
>
> --
> play.libs.WS using proxy
> https://bugs.launchpad.net/bugs/432461
> You received this bug notification because you are a member of play
> framework developers, which is subscribed to play framework.

Revision history for this message
omillien (omillien) wrote :

Ok but behind proxy sometimes names resolution is not activated and this what happens unlike it works with java.net.URLConnection

java.net.UnknownHostException: www.google.fr
 at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
 at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
 at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1200)
 at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
 at java.net.InetAddress.getAllByName(InetAddress.java:1083)
 at java.net.InetAddress.getAllByName(InetAddress.java:1019)
 at play.libs.WS$1.createSocket(WS.java:137)
 at play.libs.WS$1.createSocket(WS.java:165)
 at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
 at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
 at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
 at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
 at play.libs.WS$WSRequest.executeRequest(WS.java:865)

Changed in play:
status: Fix Committed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.