mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-09 07:08:00 +08:00
fix inflate bug
This commit is contained in:
parent
78472ee493
commit
303f97ae5e
@ -92,10 +92,6 @@ public class HttpInputStream extends InputStream {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 分段响应内容解析
|
|
||||||
if(response.isChunked()) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response.isGzip() && false == (response.in instanceof GZIPInputStream)) {
|
if (response.isGzip() && false == (response.in instanceof GZIPInputStream)) {
|
||||||
// Accept-Encoding: gzip
|
// Accept-Encoding: gzip
|
||||||
try {
|
try {
|
||||||
|
@ -98,4 +98,12 @@ public class HttpRequestTest {
|
|||||||
.setSSLProtocol(SSLSocketFactoryBuilder.TLSv12);
|
.setSSLProtocol(SSLSocketFactoryBuilder.TLSv12);
|
||||||
Console.log(request.execute().body());
|
Console.log(request.execute().body());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void getDeflateTest() {
|
||||||
|
String res = HttpRequest.get("https://comment.bilibili.com/67573272.xml")
|
||||||
|
.execute().body();
|
||||||
|
Console.log(res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,14 +60,6 @@ public class HttpUtilTest {
|
|||||||
Console.log(str);
|
Console.log(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@Ignore
|
|
||||||
public void getTest5() {
|
|
||||||
String res = HttpRequest.get("https://comment.bilibili.com/67573272.xml")
|
|
||||||
.execute().body();
|
|
||||||
Console.log(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Ignore
|
||||||
public void get12306Test() {
|
public void get12306Test() {
|
||||||
@ -98,6 +90,7 @@ public class HttpUtilTest {
|
|||||||
|
|
||||||
// 请求下一页,检查Cookie是否复用
|
// 请求下一页,检查Cookie是否复用
|
||||||
listContent = HttpUtil.get("https://www.oschina.net/action/ajax/get_more_news_list?newsType=&p=3");
|
listContent = HttpUtil.get("https://www.oschina.net/action/ajax/get_more_news_list?newsType=&p=3");
|
||||||
|
Console.log(listContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user