iodine 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1698,16 +1698,17 @@ static VALUE iodine_connection_env_get(VALUE self) {
1698
1698
  IODINE_RACK_QUERY_STRING,
1699
1699
  fio_keystr_info(&c->http->query),
1700
1700
  (c->store + IODINE_CONNECTION_STORE_tmp));
1701
- { /* Router: SCRIPT_NAME*/
1701
+ { /* Router: SCRIPT_NAME */
1702
1702
  fio_str_info_s opath = fio_http_opath(c->http);
1703
1703
  fio_str_info_s path = fio_http_path(c->http);
1704
- path.len -= (path.len == 1);
1705
- opath.len -= path.len;
1706
- if (opath.len)
1707
- iodine_env_set_const_key(env,
1708
- IODINE_RACK_SCRIPT_NAME,
1709
- opath,
1710
- (c->store + IODINE_CONNECTION_STORE_tmp));
1704
+ /* Accepted requests have a nonempty original path. Discount only the
1705
+ * router-inferred "/", not a real trailing slash. */
1706
+ opath.len -= path.len -
1707
+ ((path.len == 1) & (opath.buf[opath.len - 1] != '/'));
1708
+ iodine_env_set_const_key(env,
1709
+ IODINE_RACK_SCRIPT_NAME,
1710
+ opath,
1711
+ (c->store + IODINE_CONNECTION_STORE_tmp));
1711
1712
  }
1712
1713
  {
1713
1714
  fio_str_info_s host =
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Iodine
4
4
  # The Iodine gem version number
5
- VERSION = "0.8.6"
5
+ VERSION = "0.8.7"
6
6
  # NeoRack supported extensions.
7
7
  def self.extensions
8
8
  return (@extensions ||= { iodine: (VERSION.split(?.).map() {|i| i.to_i.to_s == i ? i.to_i : i }),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
@@ -134,7 +134,7 @@ metadata:
134
134
  homepage_uri: https://github.com/boazsegev/iodine
135
135
  source_code_uri: https://github.com/boazsegev/iodine
136
136
  changelog_uri: https://github.com/boazsegev/iodine/blob/master/CHANGELOG.md
137
- post_install_message: Thank you for installing Iodine 0.8.6.
137
+ post_install_message: Thank you for installing Iodine 0.8.7.
138
138
  rdoc_options: []
139
139
  require_paths:
140
140
  - lib