修复某些Header无法设置的问题
This commit is contained in:
parent
1a6b97a65a
commit
c1c79c8683
@ -23,6 +23,8 @@ import org.spiderflow.model.SpiderNode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* 请求执行器
|
||||
* @author Administrator
|
||||
@ -79,6 +81,12 @@ public class RequestExecutor implements ShapeExecutor,Grammerable{
|
||||
return "request";
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
void init(){
|
||||
//允许设置被限制的请求头
|
||||
System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(SpiderNode node, SpiderContext context, Map<String,Object> variables) {
|
||||
String sleepCondition = node.getStringJsonValue(SLEEP);
|
||||
|
Loading…
Reference in New Issue
Block a user