Skip to content

HTTP client proxy incorrectly parsed #331

@justparking

Description

@justparking

e.g. given this code:

@local_action({})
def proxyInit():
  # setting the proxy must be called before any HTTP client operations
  console.info("setting proxy...")
  nodetoolkit.getHttpClient().setProxy("127.0.0.1:9999", None, None)

@local_action({})
def getGoogle():
  console.info("getting google")
  resp = get_url("https://www.google.com")
  console.info("resp: %s" % resp)

...this is the result in the console.

...org.nodel.io.UnexpectedIOException
   ...org.nodel.io.UnexpectedIOException
      ...java.net.UnknownHostException: 127.0.0.

This is obviously a simple bug to fix but in the mean time, a simple WORKAROUND is to insert a space into the value so for the above example it would be:

  nodetoolkit.getHttpClient().setProxy("127.0.0.1: 9999", None, None) # notice the space between the colon and the 9999.

CC @thefennecdeer @paxofsnax

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expecteddocumentationImprovements or additions to documentationworkaround existsA workaround is available for this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions