Tag: capedwarf

TaskQueue无法执行HTTP调用 – 缺少必需的标头?

错误在此代码中: public String getVersion() { String result = null; int index = this.getRequest().getProtocol().indexOf(47); if (index != -1) { result = this.getRequest().getProtocol().substring(index + 1); } return result; } 错误是“无法找到强制”主机“HTTP标头。”: 10:34:29,889 INFO [org.restlet] (Thread-6 (HornetQ-client-global-threads-1773619305)) Couldn’t find the mandatory “Host” HTTP header. 10:34:29,910 WARNING [org.restlet.Component.Server] (Thread-6 (HornetQ-client-global-threads-1773619305)) Error while handling an HTTP server call: java.lang.NullPointerException at org.restlet.ext.servlet.internal.ServletCall.getVersion(ServletCall.java:370) […]