AnimeWallpaper icon indicating copy to clipboard operation
AnimeWallpaper copied to clipboard

new HttpDns() lookup 正常返回List<InetAddress>,但是最终发出去的请求并没有被替换host,这是为什么

Open Z644912187 opened this issue 7 years ago • 1 comments

new OkHttpClient.Builder() .dns(new HttpDns()) .addInterceptor(new HeadInterceptor()) .addInterceptor(new TokenInterceptor()) .readTimeout(TIME_OUT, TimeUnit.MILLISECONDS) .cache(cache) .build(); new HttpDns() lookup 正常返回List<InetAddress>,但是最终发出去的请求并没有被替换host,这是为什么

Z644912187 avatar Nov 24 '16 10:11 Z644912187

可以在Interceptor 与 networkInterceptor中 打断点调测一下。不太明白你的Host是什么意思,本来HTTP请求就不用替换Host。

miao1007 avatar Nov 27 '16 06:11 miao1007