lownode 0.5.10 → 0.5.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f8f9f10353fbd2b27cfc19fba0f9d562c500e4b6883940e117076ae8b0fbf6
4
- data.tar.gz: df3d7c0a6d21c5fa87979696298065d217630c05f19c53865be32fb24a42fdfd
3
+ metadata.gz: bc3a58ddd19cb2e435d07bf036eb2cb5bb15bfb9d1dcde322e8f343a1102a2ec
4
+ data.tar.gz: 25b0a07ca7d4eee5fc35a910e6edf0efbb9ca66f5c41aeef0f1d494e653566c1
5
5
  SHA512:
6
- metadata.gz: 06a9eaa678de704be7064f90db14932906cf95bcd9d2394be471e3c99f889ac9db21111765c62dc134eb17869a0f291f183db5a49d25ec716fd6e7f8edb10288
7
- data.tar.gz: f9c2a6b4922a2625621a87c13aa34f61651bc3f180f38ae9af0b27978475341644fbf954ddd6cfbe4278c56579025d18b05e976a58ca5158f46648c0d5e7eb3e
6
+ metadata.gz: de73cf7e2a2d46f544b7096a9a67d0eac5b32a01fae936fd72dc8f2d6332d273ce12ab46468f0d9a034f110734e182283a2564d83fc37d819184e44a06015efc
7
+ data.tar.gz: 1b9d857d6fae49e2d08bc5fb79df9662f9c135493b1974ef71976819c32f85aad1bf57c6b5ba063471015c95b6285002ba85d93b49112aa09110636c9bb2b108
@@ -108,9 +108,9 @@ module Low
108
108
  end
109
109
  end
110
110
 
111
- # What a template or action rendered, as HTML.
111
+ # What a template or action rendered, as HTML unless the node added its own content type, like text/plain.
112
112
  def html_response_event(html:, event:, headers:)
113
- headers.add('content-type', 'text/html')
113
+ headers.add('content-type', 'text/html') unless headers.include?('content-type')
114
114
  response = Protocol::HTTP::Response.new('HTTP/1.1', response_status(event), headers, Protocol::HTTP::Body::Buffered.wrap(html.strip))
115
115
  Low::Events::ResponseEvent.new(response:).tap(&:branch)
116
116
  end
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Low
4
4
  module Node
5
- VERSION = '0.5.10'
5
+ VERSION = '0.5.11'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lownode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.10
4
+ version: 0.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi