diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-02-08 13:58:32 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-02-08 14:14:08 +1300 |
commit | 9045515f17b6147c6d8eb27ffa67f03721d2c3ac (patch) | |
tree | 85637195441d42eb89b2845d6b5946ebfc428f1f | |
parent | 84b218184ba2b34a56c558863770f44550e90934 (diff) | |
download | rack-9045515f17b6147c6d8eb27ffa67f03721d2c3ac.tar.gz |
Deprecate option parsing in config.ru files.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/rack/builder.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9918f45e..8580cd56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ All notable changes to this project will be documented in this file. For info on - `Rack::Directory` allow directory traversal inside root directory. ([#1417](https://github.com/rack/rack/pull/1417), [@ThomasSevestre](https://github.com/ThomasSevestre)) - Sort encodings by server preference. ([#1184](https://github.com/rack/rack/pull/1184), [@ioquatix](https://github.com/ioquatix), [@wjordan](https://github.com/wjordan)) - Rework host/hostname/authority implementation in `Rack::Request`. `#host` and `#host_with_port` have been changed to correctly return IPv6 addresses formatted with square brackets, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-3.2.2). ([#1561](https://github.com/rack/rack/pull/1561), [@ioquatix](https://github.com/ioquatix)) +- `Rack::Builder` parsing options on first `#\` line is deprecated. ([#1574](https://github.com/rack/rack/pull/1574), [@ioquatix](https://github.com/ioquatix)) ### Removed diff --git a/lib/rack/builder.rb b/lib/rack/builder.rb index 764e3f1f..816ecf62 100644 --- a/lib/rack/builder.rb +++ b/lib/rack/builder.rb @@ -97,6 +97,7 @@ module Rack cfgfile.slice!(/\A#{UTF_8_BOM}/) if cfgfile.encoding == Encoding::UTF_8 if cfgfile[/^#\\(.*)/] && opts + warn "Parsing options from the first comment line is deprecated!" options = opts.parse! $1.split(/\s+/) end |