New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Http工具类获取网页时出错 #1271

Closed
qinerg opened this Issue May 31, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@qinerg
Member

qinerg commented May 31, 2017

Caused by: java.lang.NumberFormatException: For input string: "3073207196" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:495) at java.lang.Integer.parseInt(Integer.java:527) at org.nutz.http.Cookie.parse(Cookie.java:57) at org.nutz.http.Cookie.afterResponse(Cookie.java:101) at org.nutz.http.Response.<init>(Response.java:28) at org.nutz.http.Sender.createResponse(Sender.java:105) at org.nutz.http.sender.GetSender.send(GetSender.java:19) ... 2 more
经过跟踪发现应该是网页返回的Max-Age超过了 Integer 的最大数。
if ("Max-Age".equals(p.getName())) { int age = Integer.parseInt(p.getValue()); if (age == 0) return; }
注,问题应该出现在新版上,老的 nutz-1.b.53.jar 无此问题

@wendal wendal closed this in 336792e May 31, 2017

@wendal

This comment has been minimized.

Show comment
Hide comment
@wendal

wendal May 31, 2017

Member

好,非常感谢

Member

wendal commented May 31, 2017

好,非常感谢

@wendal wendal added this to the 1.r.62 milestone May 31, 2017

@wendal wendal added the Http label May 31, 2017

@wendal wendal self-assigned this May 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment