lib/zold/http.rb in zold-0.4 vs lib/zold/http.rb in zold-0.4.1

- old
+ new

@@ -18,10 +18,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. require 'rainbow' require 'net/http' +require_relative 'version' require_relative 'score' # HTTP page. # Author:: Yegor Bugayenko (yegor256@gmail.com) # Copyright:: Copyright (c) 2018 Yegor Bugayenko @@ -59,10 +60,11 @@ private def headers headers = { - 'User-Agent': 'Zold' + 'User-Agent': "Zold #{VERSION}", + 'Connection': 'close' } if @score.valid? && @score.value >= 3 headers[SCORE_HEADER] = score.reduced(4).to_s end headers