ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:71421] [Ruby trunk - Bug #11671] [Open] Net::HTTP uses closed keep-alive connection, causing EOFError
       [not found] <redmine.issue-11671.20151109162659@ruby-lang.org>
@ 2015-11-09 16:26 ` kris.hanekamp
  2015-12-18  3:50 ` [ruby-core:72236] [Ruby trunk - Bug #11671] [Closed] " naruse
  1 sibling, 0 replies; 2+ messages in thread
From: kris.hanekamp @ 2015-11-09 16:26 UTC (permalink / raw)
  To: ruby-core

Issue #11671 has been reported by Kristian Hanekamp.

----------------------------------------
Bug #11671: Net::HTTP uses closed keep-alive connection, causing EOFError
https://bugs.ruby-lang.org/issues/11671

* Author: Kristian Hanekamp
* Status: Open
* Priority: Normal
* Assignee: Yui NARUSE
* ruby -v: trunk
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Most HTTP servers close idle keep-alive connections after a timeout. For the client, this leads to the TCP socket reaching End-Of-File (EOF). Currently, `Net::HTTP` does not check for EOF  before reusing a keep-alive connection, causing an `EOFError`.

For idempotent requests (for example GET), this does not do much harm, since Net::HTTP simply retries the request. But this does not work for requests that aren't idempotent like POST, so `HTTP#post` will raise an unnecessary `EOFError`.

My suggestion is to check for EOF before reusing a keep-alive connection. 

I've prepared a Github PR for this: https://github.com/ruby/ruby/pull/1089




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:72236] [Ruby trunk - Bug #11671] [Closed] Net::HTTP uses closed keep-alive connection, causing EOFError
       [not found] <redmine.issue-11671.20151109162659@ruby-lang.org>
  2015-11-09 16:26 ` [ruby-core:71421] [Ruby trunk - Bug #11671] [Open] Net::HTTP uses closed keep-alive connection, causing EOFError kris.hanekamp
@ 2015-12-18  3:50 ` naruse
  1 sibling, 0 replies; 2+ messages in thread
From: naruse @ 2015-12-18  3:50 UTC (permalink / raw)
  To: ruby-core

Issue #11671 has been updated by Yui NARUSE.

Status changed from Open to Closed

----------------------------------------
Bug #11671: Net::HTTP uses closed keep-alive connection, causing EOFError
https://bugs.ruby-lang.org/issues/11671#change-55644

* Author: Kristian Hanekamp
* Status: Closed
* Priority: Normal
* Assignee: Yui NARUSE
* ruby -v: trunk
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Most HTTP servers close idle keep-alive connections after a timeout. For the client, this leads to the TCP socket reaching End-Of-File (EOF). Currently, `Net::HTTP` does not check for EOF  before reusing a keep-alive connection, causing an `EOFError`.

For idempotent requests (for example GET), this does not do much harm, since Net::HTTP simply retries the request. But this does not work for requests that aren't idempotent like POST, so `HTTP#post` will raise an unnecessary `EOFError`.

My suggestion is to check for EOF before reusing a keep-alive connection. 

I've prepared a Github PR for this: https://github.com/ruby/ruby/pull/1089




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-18  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11671.20151109162659@ruby-lang.org>
2015-11-09 16:26 ` [ruby-core:71421] [Ruby trunk - Bug #11671] [Open] Net::HTTP uses closed keep-alive connection, causing EOFError kris.hanekamp
2015-12-18  3:50 ` [ruby-core:72236] [Ruby trunk - Bug #11671] [Closed] " naruse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).