我得到了这个错误
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens我有一个应用程序https://test.com,我可以在其中调用后端服务器,以便从亚马逊s3等云存储中检索文件。后端调用为https://backend.com/api/getFile
spring boot控制器示例
@RequestMapping(value = "/api/getFiles", method = RequestMethod.POST)
public ResponseEntity<?> getAllFules(@RequestBody String test){
try{
//some code
return new ResponseEntity<Object>("ok", HttpStatus.OK);
}catch(Exception e){
return new ResponseEntity<Object>("not ok", HttpStatus.BAD_REQUEST);
}
}后端服务器有一个路由到proxy_pass http://127.0.0.1:8080/的nginx运行
在angular中,客户端http代码如下所示
$http({
url: 'https://www.backend.com/api/getFiles',
method: "POST",
data: auth.profile['email']
})
.then(function(response) {
console.log(" post success get files");
},
function(response) { // optional
// failed
console.log("post failed get files");
}) 发布于 2018-02-26 14:20:17
当我试图将https://localhost:7002 (weblogic)调用到http://localhost:8080 (tomcat)时,我也得到了同样的错误。
您需要在使用两个服务器的两个servers.if中启用SSL。因为如我所见,您的http://127.0.0.1:8080/不是支持ssl的服务器。
https://stackoverflow.com/questions/48506508
复制相似问题