From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C2E7E1F59D for ; Wed, 11 Jan 2023 11:12:10 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=shopify.com header.i=@shopify.com header.a=rsa-sha256 header.s=google header.b=I13AAZ5x; dkim-atps=neutral Received: by mail-wm1-x32e.google.com with SMTP id m8-20020a05600c3b0800b003d96f801c48so14082939wms.0 for ; Wed, 11 Jan 2023 03:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopify.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=X51iMyXKgDmzUfqjIZ7PMO9jeY+ZVsBOVUXZx/fyUQo=; b=I13AAZ5xe9E5qXZRygRJpEIQ90AtGrOfTyXKItmNKhUEocoVnHGKHNtBn9LzSL9Mr8 5KBt7oYz5YXzgwTCCAWhka4YkMqUDW+adto0VtxwjWUGYyeWEK6S1GzzKXGU7jd0lf4T scLD5Yq6sPh5Vf0o41ICTgg1mArmdgA/oaFyQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X51iMyXKgDmzUfqjIZ7PMO9jeY+ZVsBOVUXZx/fyUQo=; b=YBs9s1IYs2XW+6e6eTaFAdCzxj2CsavbaVnVTuKJRLmRdlWr3n2xQaBuoFNGnYK5Z2 TwnYV9bJ8UgRha9baXkXayuzPB2quk/Whedr/qvKcqIKAb6UJXP/Y4hiBptky2jViOQ6 U+cO+lbc3FdtJosFYT+dqE4T3XgI6BSgWyNVqxICIe1UqJThVWb0cVISmFIiCx5LbiOB ePt3LXoMA6zKS7G6gPoSYceR1IglJ9J91Q3YU7gKMkfNmQaB05QwWhIL/NnVb/K2nZKj wfN497tum0tTTAyJ1NEQQWYqStDAvhu4VEhPor0sFtRJfUOrE9hv6aSMNl19X/ZXoKO9 iTfQ== X-Gm-Message-State: AFqh2kp90/MERbWCwTXqSj4oIC8gily0OXkKwSACG0IYJQ+zXEpi07ez jnryDqEdjMGfFX2+tpdCUccZYA== X-Google-Smtp-Source: AMrXdXshMlpDaafutHmp5EnSFUqabHDZoSDSEGOoEFFJiFVCGhW27f84g31Lwi3gUx9SQSwOrKLTJQ== X-Received: by 2002:a7b:cb89:0:b0:3d2:2101:1f54 with SMTP id m9-20020a7bcb89000000b003d221011f54mr51840003wmi.4.1673435528334; Wed, 11 Jan 2023 03:12:08 -0800 (PST) Received: from ?IPV6:2a01:e0a:2a1:c1c0:f585:1a7e:769e:478e? ([2a01:e0a:2a1:c1c0:f585:1a7e:769e:478e]) by smtp.gmail.com with ESMTPSA id z8-20020a5d6548000000b0028df2d57204sm15955143wrv.81.2023.01.11.03.12.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Jan 2023 03:12:07 -0800 (PST) Message-ID: Date: Wed, 11 Jan 2023 12:12:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Support for Rack 3 headers formatted as arrays Content-Language: fr To: Eric Wong , Martin Posthumus Cc: unicorn-public@yhbt.net References: <20221210024246.GA8584@dcvr> <7c851d8a-bc57-7df8-3240-2f5ab831c47c@gmail.com> <20221225225658.M711750@dcvr> From: Jean Boussier In-Reply-To: <20221225225658.M711750@dcvr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: Interestingly, this patch would also help with Ruby 3.2 compatibility. Ruby 3.2 removed `Kernel#=~`, so when misbehaving app return header values in e.g. Integer unicorn now choke on it: app error: undefined method `=~' for 43747171631368:Integer (NoMethodError) unicorn-6.1.0/lib/unicorn/http_response.rb:43:in `block in http_response_write' unicorn-6.1.0/lib/unicorn/http_response.rb:34:in `each' unicorn-6.1.0/lib/unicorn/http_response.rb:34:in `http_response_write' unicorn-6.1.0/lib/unicorn/http_server.rb:645:in `process_client' Whereas on 3.1 and older, `42 =~ /\n/` would simply not match and cast the header as a String.