Search code examples
javagoogle-app-enginecapedwarf

Null hostname - Capedwarf


This code should return the hostname, however Capedwarf runtime returns null for this code:

public String getHostname() {
   ApiProxy.Environment proxyEnvironment = ApiProxy.getCurrentEnvironment();
   Map<String, Object> attributes = proxyEnvironment.getAttributes();
   String hostname = (String) attributes.get(LocalEnvironment.DEFAULT_VERSION_HOSTNAME);
   return hostname;
}

Solution

  • I suggest rather then posting here, open an issue either on CapeDwarf's JIRA or its GitHub project. So that the issues don't get lost or forgotten. And even more, try tackling these issues, as they seem to be fairly simple.