diff --git a/src/mechanize/form.cr b/src/mechanize/form.cr index 6a2226f..be3334f 100644 --- a/src/mechanize/form.cr +++ b/src/mechanize/form.cr @@ -82,6 +82,7 @@ class MechanizeCr::Form end successful_controls.each do |ctrl| value = ctrl.query_value + next if value[0] == "" query.push(value) end query diff --git a/src/mechanize/http/agent.cr b/src/mechanize/http/agent.cr index 03f1dd6..40d0104 100644 --- a/src/mechanize/http/agent.cr +++ b/src/mechanize/http/agent.cr @@ -93,6 +93,7 @@ module MechanizeCr referer_uri = current_page.uri host = referer_uri.host scheme = referer_uri.scheme + uri = "/" + uri unless uri[0] == '/' new_uri = URI.new(scheme: scheme, host: host, path: uri) end end