unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Jean Boussier <jean.boussier@shopify.com>
Cc: Martin Posthumus <martin.posthumus@gmail.com>, unicorn-public@yhbt.net
Subject: Re: Support for Rack 3 headers formatted as arrays
Date: Wed, 11 Jan 2023 11:40:09 +0000	[thread overview]
Message-ID: <20230111114009.M42943@dcvr> (raw)
In-Reply-To: <f79ea4aa-421e-4c63-c704-efe2d5fd03cb@shopify.com>

Jean Boussier <jean.boussier@shopify.com> wrote:
> 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:

Thanks for that note.  2 things:

1. Ugh.  That sort disregard for compatibility at the expense of making
   things "better" is why I and most people I've known no longer do new
   projects in Ruby :<  Heck, I started rewriting many of unicorn's tests
   in Perl5 a few weeks ago since I want to be able to trust them decades
   from now.

2. I suppose unicorn will continue letting misbehaving apps have
   their way.  It would be nice if developers consistently
   tested with Rack::Lint, of course

> Whereas on 3.1 and older, `42 =~ /\n/` would simply not match and cast the
> header as a String.

Now I wonder if case/when === behavior will break someday...

  reply	other threads:[~2023-01-11 11:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 21:52 Support for Rack 3 headers formatted as arrays Martin Posthumus
2022-12-10  2:42 ` Eric Wong
2022-12-12 15:52   ` Martin Posthumus
2022-12-25 22:56     ` Eric Wong
2022-12-27  8:17       ` Jean Boussier
2023-01-11 11:12       ` Jean Boussier
2023-01-11 11:40         ` Eric Wong [this message]
2023-01-11 11:44           ` Jean Boussier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230111114009.M42943@dcvr \
    --to=e@80x24.org \
    --cc=jean.boussier@shopify.com \
    --cc=martin.posthumus@gmail.com \
    --cc=unicorn-public@yhbt.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).