mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add toURI encode option
This commit is contained in:
parent
8c486b4e4f
commit
d675b7376d
@ -1,5 +1,9 @@
|
||||
package cn.hutool.http.cookie;
|
||||
|
||||
import cn.hutool.core.io.IORuntimeException;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import cn.hutool.http.HttpConnection;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.CookieManager;
|
||||
import java.net.CookiePolicy;
|
||||
@ -7,11 +11,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.io.IORuntimeException;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import cn.hutool.http.HttpConnection;
|
||||
|
||||
/**
|
||||
* 全局Cooki管理器,只针对Hutool请求有效
|
||||
*
|
||||
@ -57,7 +56,6 @@ public class GlobalCookieManager {
|
||||
|
||||
Map<String, List<String>> cookieHeader;
|
||||
try {
|
||||
Console.log(URLUtil.toURI(conn.getUrl(), false));
|
||||
cookieHeader = cookieManager.get(URLUtil.toURI(conn.getUrl()), new HashMap<String, List<String>>(0));
|
||||
} catch (IOException e) {
|
||||
throw new IORuntimeException(e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user