From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 11C4017DD443 for ; Tue, 30 Dec 2014 00:15:44 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 15C62B5D836 for ; Tue, 30 Dec 2014 00:11:08 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id BF22497A82B for ; Tue, 30 Dec 2014 00:11:10 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bYsAKhlKmpWk for ; Tue, 30 Dec 2014 00:11:10 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 593F597A820 for ; Tue, 30 Dec 2014 00:11:10 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 4D3E6952439 for ; Tue, 30 Dec 2014 00:11:04 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id ACE76120476; Tue, 30 Dec 2014 00:11:02 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 2CB36120460 for ; Tue, 30 Dec 2014 00:10:58 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=DhK/P7m84bx2H4CcP1yzX7zumXQ=; b=cJr93ne7q5HHztCQhO nBoec4kB7RmHDMis7OXdRJqFMaYsr8hm3L08a2D0xgy1dMoEywutLXA360+zizeM uuEUFuIrcgfemPi/rJcI8g9lpqwYOVF+QxIsSjXumG3SlSMhitK838l7+eG3nBvp 4m9su7NclSdqQoZtrprW8s4jA= Received: by filter0244p1mdw1.sendgrid.net with SMTP id filter0244p1mdw1.14965.54A16EFDC 2014-12-29 15:10:54.036631876 +0000 UTC Received: from herokuapp.com (ec2-54-82-90-140.compute-1.amazonaws.com [54.82.90.140]) by ismtpd-031 (SG) with ESMTP id 14a96999012.3be2.acc7a for ; Mon, 29 Dec 2014 15:10:53 +0000 (UTC) Date: Mon, 29 Dec 2014 15:10:53 +0000 From: jeremy.lecour@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Redmine-MailingListIntegration-Message-Ids: 41616 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10674 X-Redmine-Issue-Author: jlecour X-Redmine-Issue-Assignee: drbrain X-Redmine-Sender: jlecour X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS7pkUi7LCGWuY77BfSZqVnx5neheNQGW0+oLn ulPxg8Q29qQnqN8UPUAIswQxza9VO80KiEUwRFc/Sjf4AKEQMfg2NJEAbEMLzh0/fAWGW9ohvaPlka Z2OLQrsUnj/ta/quTbeZlJaHR4Uxbjge+SLq X-SendGrid-Contentd-ID: {"test_id":"1419865855"} X-ML-Name: ruby-core X-Mail-Count: 67206 Subject: [ruby-core:67206] [ruby-trunk - Feature #10674] [Open] Net::HTTP retries idempotent requests once after a timeout, but its not configurable X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10674 has been reported by J=C3=A9r=C3=A9my Lecour. ---------------------------------------- Feature #10674: Net::HTTP retries idempotent requests once after a timeout,= but its not configurable https://bugs.ruby-lang.org/issues/10674 * Author: J=C3=A9r=C3=A9my Lecour * Status: Open * Priority: Normal * Assignee: Eric Hodel * Category:=20 * Target version:=20 ---------------------------------------- Hi, I've noticed that Net::HTTP retries idempotent requests once after a time-o= ut. It seems to adhere to the RFC 2616 (http://tools.ietf.org/html/rfc2616)= , but it is not always the best thing to do. When you don't know exactly how a remote web service works, it may be wise = to retry after a time-out. But when you know that a retry won't change anything, it should be possible= to disable this automatic retry. Otherwise, the server will have to deal w= ith 2 requests (instead of 1) and the client will effectively time-out twic= e later than expected (time for the first and second time-out). Having a basic "#retry=3D" (like we have "#read_timeout=3D" or "#open_timeo= ut" would be good first step. The value could be a simple boolean, or even an integer for the maximum num= ber of retries. The "Retry" middleware in Faraday has a more comprehensive feature set with= max retries, exponential back-off, =E2=80=A6 : https://github.com/lostisla= nd/faraday/blob/master/lib/faraday/request/retry.rb --=20 https://bugs.ruby-lang.org/