Skip to content

Commit

Permalink
Add server and date header as recommended by RFCs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 12, 2020
1 parent a2099f0 commit 59bf99b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/falcon/adapters/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def self.wrap(status, headers, body, request = nil)
protocol = meta['rack.protocol']

# https://tools.ietf.org/html/rfc7231#section-7.4.2
# headers.add('server', "falcon/#{Falcon::VERSION}")
headers.add('server', "falcon/#{Falcon::VERSION}")

# https://tools.ietf.org/html/rfc7231#section-7.1.1.2
# headers.add('date', Time.now.httpdate)
headers.add('date', Time.now.httpdate)

return self.new(status, headers, body, protocol)
end
Expand Down

0 comments on commit 59bf99b

Please sign in to comment.