lowloop 0.8.7 → 0.8.8

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: 38d73ae8ac834cc72db7520604634e6e9aa75284b82022b88efe6134ac257cc8
4
- data.tar.gz: ad5d76b91c7778a1fbbb5a107ad43ca6d166654450e8e6a5540803e99556ed9b
3
+ metadata.gz: bfe9d4f8e5d6e9ffff362e2b8d5c0c645bd418a320a6a51aac79fdc67cd3bd66
4
+ data.tar.gz: ccabed591fd8a1c21f129bf8d7dbf8c6dd887d44fc6d2c458638ec4b29b97b0c
5
5
  SHA512:
6
- metadata.gz: ae22bc76a568d7e60b366107c2b5a6f3cb77ab0807c8f09272b5bff3c3ff09b3a52524c808cb7f1b9feeca81bfc18875b99c815cca06ed91530503fe7e64a507
7
- data.tar.gz: fef53772f9f81a193f01e64718caddaa43014eb001c4dc3157bf053dbdda84277b05fde7294eed2bb8a4446eafb07396a525dd0eff11c0f773494ae23e54b30c
6
+ metadata.gz: 3a76bc518c204e4a3e77f24dbd3c7183a74b01419f97992c3dca6606f9c0918f5c02fbac613525f3755a400305b6bb36153ca84a0e60ed974eb7bbba61650ce8
7
+ data.tar.gz: 10e3235fcf3b7634bcfde96e0ed4c129fdd9ae5c05a24a97628ae121f50fb882943bfcc6973c6cdd74e2e9c1eb532219d98c8a2958c4e16c83a40df59ad0cbaf
@@ -37,7 +37,7 @@ module Low
37
37
 
38
38
  version ||= request.version
39
39
  unless headers_valid?(request)
40
- ResponseBuilder.respond(config:, socket:, response: ResponseFactory.status(code: 400), keep_alive: false)
40
+ ResponseBuilder.respond(socket:, response: ResponseFactory.status(code: 400), keep_alive: false)
41
41
  break
42
42
  end
43
43
 
@@ -45,7 +45,7 @@ module Low
45
45
 
46
46
  response = respond_to(request:)
47
47
 
48
- ResponseBuilder.respond(config:, socket:, response:, keep_alive:)
48
+ ResponseBuilder.respond(socket:, response:, keep_alive:)
49
49
  end
50
50
  end
51
51
 
@@ -4,7 +4,7 @@ module Low
4
4
  class ResponseBuilder
5
5
  class << self
6
6
  # TODO: Use Async wherever we can where it doesn't have "Task" requirement.
7
- def respond(config:, socket:, response:, keep_alive: true)
7
+ def respond(socket:, response:, keep_alive: true)
8
8
  file_body = response.body.respond_to?(:file)
9
9
 
10
10
  if file_body
@@ -18,7 +18,6 @@ module Low
18
18
  # Build the whole head in memory then write once, as every socket write is a syscall.
19
19
  head = +''
20
20
  write_status_line(head, response)
21
- write_host_header(head, config)
22
21
  write_response_headers(head, response)
23
22
  write_final_headers(head, content_length, keep_alive)
24
23
 
@@ -38,10 +37,6 @@ module Low
38
37
  head << "#{response.version} #{response.status}\r\n"
39
38
  end
40
39
 
41
- def write_host_header(head, config)
42
- head << (config.port.nil? ? "Host: #{config.host}\r\n" : "Host: #{config.host}:#{config.port}\r\n")
43
- end
44
-
45
40
  def write_response_headers(head, response)
46
41
  response.headers.fields.each do |key, value|
47
42
  next if %w[content-length connection].include?(key.to_s.downcase)
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Low
4
4
  module Loop
5
- VERSION = '0.8.7'
5
+ VERSION = '0.8.8'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lowloop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi