This commit is contained in:
jinyu
2015-12-29 16:28:30 +08:00
parent 92a847ecac
commit 1850b4fcdd
9 changed files with 109 additions and 18 deletions
@@ -151,7 +151,7 @@ public class HttpComponent3 extends AbstractHttpClient {
StringUtil.join(header.getValue(), ';'));
} else {
for (String headerValue : header.getValue()) {
httpMethod.addRequestHeader(header.getKey(),
httpMethod.setRequestHeader(header.getKey(),
headerValue != null ? headerValue : "");
}
}
@@ -82,11 +82,11 @@ public abstract class HttpComponent4 extends AbstractHttpClient {
.entrySet().iterator(); headerIterator.hasNext();) {
Entry<String, List<String>> header = headerIterator.next();
if (HttpHeaders.COOKIE.equalsIgnoreCase(header.getKey())) {
uriRequest.addHeader(header.getKey(),
uriRequest.setHeader(header.getKey(),
StringUtil.join(header.getValue(), ';'));
} else {
for (String headerValue : header.getValue()) {
uriRequest.addHeader(header.getKey(),
uriRequest.setHeader(header.getKey(),
headerValue != null ? headerValue : "");
}
}
@@ -181,7 +181,7 @@ public class Netty4HttpClient extends AbstractHttpClient {
for (Iterator<Entry<String, List<String>>> headerIterator = headers
.entrySet().iterator(); headerIterator.hasNext();) {
Entry<String, List<String>> header = headerIterator.next();
uriRequest.headers().add(header.getKey(), header.getValue());
uriRequest.headers().set(header.getKey(), header.getValue());
}
uriRequest.headers().set(HttpHeaders.CONNECTION,
io.netty.handler.codec.http.HttpHeaders.Values.CLOSE);
@@ -337,6 +337,14 @@
<code>40092</code>
<text>导入文件存在不合法的内容</text>
</error>
<error>
<code>40093</code>
<text>不合法的跳转target</text>
</error>
<error>
<code>40094</code>
<text>不合法的URL</text>
</error>
<error>
<code>40117</code>
<text>分组名字不合法</text>
@@ -463,6 +471,14 @@
<code>41025</code>
<text>缺少永久授权码</text>
</error>
<error>
<code>41034</code>
<text>缺少login_ticket</text>
</error>
<error>
<code>41035</code>
<text>缺少跳转target</text>
</error>
<error>
<code>42001</code>
<desc>access_token expired</desc>
@@ -821,6 +837,30 @@
<code>60017</code>
<text>不允许设置企业</text>
</error>
<error>
<code>60019</code>
<text>不允许设置应用地理位置上报开关</text>
</error>
<error>
<code>60020</code>
<text>访问ip不在白名单之中</text>
</error>
<error>
<code>60025</code>
<text>主页型应用不支持的消息类型</text>
</error>
<error>
<code>60027</code>
<text>主页型应用不支持调用该接口</text>
</error>
<error>
<code>60028</code>
<text>应用已授权予第三方,不允许通过分级管理员主页url</text>
</error>
<error>
<code>60029</code>
<text>应用已授权予第三方,不允许通过分级管理员修改可信域名</text>
</error>
<error>
<code>60102</code>
<text>UserID已存在</text>
@@ -41,7 +41,7 @@ public class Token implements Serializable {
private String originalResult;
public Token() {
this.createTime = System.currentTimeMillis() / 1000l;
}
public Token(String accessToken) {