From c09ed68423eb14e18cc5ffa686dcf8f57004af41 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Thu, 25 May 2017 13:30:29 +0200 Subject: [PATCH] Change protocol to https. Signed-off-by: Thomas Hochstein --- _doc/dejure/CHANGELOG | 1 + lib/filters/dejure.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/_doc/dejure/CHANGELOG b/_doc/dejure/CHANGELOG index 4b266ed..d4b30cf 100644 --- a/_doc/dejure/CHANGELOG +++ b/_doc/dejure/CHANGELOG @@ -4,6 +4,7 @@ ### Version 0.3 (unreleased) +* Change protocol to https. * Make cache validity configurable. * Rename from "DejureIntegrator" to "DejureAutolinker". * Create cache dir recursively. diff --git a/lib/filters/dejure.rb b/lib/filters/dejure.rb index 3acf044..fd251d4 100644 --- a/lib/filters/dejure.rb +++ b/lib/filters/dejure.rb @@ -80,12 +80,12 @@ module Nanoc::Filters end def call_dejure (input, params={}) - prot = 'http://' + prot = 'https://' host = 'rechtsnetz.dejure.org' path = '/dienste/vernetzung/vernetzen' uri = URI(prot + host + path) - http = Net::HTTP.new(uri.host, uri.port) + http = Net::HTTP.new(uri.host) request = Net::HTTP::Post.new(uri.request_uri) request['User-Agent'] = params[:Anbieterkennung] + ' (DejureAutolinker for nanoc ruby-' + params[:version] + ')' request['Content-Type'] = 'application/x-www-form-urlencoded'