开发者

HTTP_CLIENT_TIMEOUT and cookie expiry period are same?

开发者 https://www.devze.com 2023-01-05 06:37 出处:网络
When HttpURLConnection.HTTP_CLIENT_TIMEOUT is true, then does this mean session expired? 开发者_高级运维If yes, then is it the same as cookie expiry? From HTTP/1.1 Status Code Definitions:

When HttpURLConnection.HTTP_CLIENT_TIMEOUT is true, then does this mean session expired?

开发者_高级运维If yes, then is it the same as cookie expiry?


From HTTP/1.1 Status Code Definitions:

10.4.9 408 Request Timeout

The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.

It has nothing to do with sessions or cookies. The client simply didn't complete a request within the expected time and the server gave up waiting for the client to finish. This can be caused when the client didn't write anything to the request body while the spec requires that (e.g. you're using POST, but not sending anything), or when the client didn't supply a Connection: Close header.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号