#210 ✓ resolved
Erwan Loisant

play command list modules ignores HTTP_PROXY

Reported by Erwan Loisant | October 5th, 2010 @ 11:59 AM | in 1.1.1

If you're connecting to a proxy through the internet the play modules commandas (list-modules and install) won't work.

Usually (when working with other commandline tools, such as perl and git) you can specifify your proxy in the system variable HTTP_PROXY. This variable will be omitted in play!

Imported from Launchpad: https://bugs.launchpad.net/play/+bug/519339

Comments and changes to this ticket

  • pdecat

    pdecat November 3rd, 2010 @ 06:58 PM

    Hi,
    this problem is still present with Play 1.1.

    Here's a quick fix :

    pdecat@localhost:~/workspace/thirdparty-products/play$ git diff
    diff --git a/framework/pym/play/commands/modulesrepo.py b/framework/pym/play/commands/modulesrepo.py
    index 6b33c4c..5ffb248 100644
    --- a/framework/pym/play/commands/modulesrepo.py +++ b/framework/pym/play/commands/modulesrepo.py @@ -436,7 +436,7 @@ def load_module_list(): def load_modules_from(modules_server):

     try:
         url = '%s/modules' % modules_server
    
    • proxy_handler = urllib2.ProxyHandler({})
    • proxy_handler = urllib2.ProxyHandler()
         req = urllib2.Request(url)
         req.add_header('Accept', 'application/json')
         opener = urllib2.build_opener(proxy_handler)
      

    Tested on both Ubuntu Linux 10.04 and Windows XP SP3 with a "http_proxy" environment variable.

    Best regards,
    Patrick.

    PS: comment previously posted at Launchpad before I noticed it had moved here...

  • pdecat

    pdecat November 3rd, 2010 @ 06:59 PM

    Oops, here's the diff correctly formatted :

    pdecat@localhost:~/workspace/thirdparty-products/play$ git diff
    diff --git a/framework/pym/play/commands/modulesrepo.py b/framework/pym/play/commands/modulesrepo.py
    index 6b33c4c..5ffb248 100644
    --- a/framework/pym/play/commands/modulesrepo.py
    +++ b/framework/pym/play/commands/modulesrepo.py
    @@ -436,7 +436,7 @@ def load_module_list():
     def load_modules_from(modules_server):
         try:
             url = '%s/modules' % modules_server
    - proxy_handler = urllib2.ProxyHandler({})
    + proxy_handler = urllib2.ProxyHandler()
             req = urllib2.Request(url)
             req.add_header('Accept', 'application/json')
             opener = urllib2.build_opener(proxy_handler)
    
  • Erwan Loisant

    Erwan Loisant November 3rd, 2010 @ 07:15 PM

    • State changed from “resolved” to “confirmed”
    • Milestone changed from 1.1 to 1.2
    • Assigned user set to “Erwan Loisant”
    • Milestone order changed from “96” to “0”
  • Play Duck
  • Erwan Loisant

    Erwan Loisant November 4th, 2010 @ 04:34 PM

    • State changed from “confirmed” to “resolved”
    • Milestone changed from 1.2 to 1.1.1
    • Milestone order changed from “14” to “0”
  • Play Duck

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Play framework

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the http://www.playframework.org website.

Source code is hosted on github

Check out our repository at http://github.com/playframework/play

Contributing, creating a patch

Please read the contributor guide

Reporting Security Vulnerabilities

Since all bug reports are public, please report any security vulnerability directly to guillaume dot bort at gmail dot com.

Creating a bug report

Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Shared Ticket Bins

Referenced by

Pages