Commit e4dcae97 authored by MARGERY David's avatar MARGERY David
Browse files

Update handling of tls options for rails 3.2

parent 7911ece4
......@@ -79,13 +79,12 @@ class JobsController < ApplicationController
:out
)
options=tls_options_for(url, :out)
http = EM::HttpRequest.new(url).delete(
http = EM::HttpRequest.new(url,{:tls => options}).delete(
:timeout => 5,
:head => {
'X-Remote-Ident' => @credentials[:cn],
'Accept' => media_type(:json)
},
:tls => options
}
)
continue_if!(http, :is => [200,202,204,404])
......@@ -125,16 +124,14 @@ class JobsController < ApplicationController
site_path(params[:site_id])+"/internal/oarapi/jobs.json", :out
)
options=tls_options_for(url, :out)
http = EM::HttpRequest.new(url).post(
http = EM::HttpRequest.new(url, {:tls => options}).post(
:timeout => 20,
:body => job_to_send.to_json,
:head => {
'X-Remote-Ident' => @credentials[:cn],
'Content-Type' => media_type(:json),
'Accept' => media_type(:json)
},
:tls => options
)
} )
continue_if!(http, :is => [201,202])
job_uid = JSON.parse(http.response)['id']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment