-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rest-client response.cookies fails when rack cache enabled #10
Comments
Transferring content on this issue here. |
The exception is
e.g. > client = {:clientId=>"dms", :clientSecret=>"dms-annos"};
> tc.auth
=> #<RestClient::Resource:0x00000006018438
@block=nil,
@options={:cookies=>{}, :headers=>{:accept=>"application/ld+json", :content_type=>"application/ld+json"}, :open_timeout=>5, :read_timeout=>30},
@url="https://triannon-dev.stanford.edu/auth">
> json_payloads = { accept: :json, content_type: :json };
> response = tc.auth["/client_identity"].post client.to_json, json_payloads;
> response.is_a? RestClient::Response
=> true
> response.headers
=> {:x_frame_options=>"SAMEORIGIN",
:x_xss_protection=>"1; mode=block",
:x_content_type_options=>"nosniff",
:content_type=>"application/json; charset=utf-8",
:etag=>"W/\"e9767a04a1db0d9b828970d126ab512d\"",
:cache_control=>"max-age=0, private, must-revalidate",
:x_request_id=>"7913b771-bfba-4870-871d-35d31224e959",
:x_runtime=>"0.169223",
:server=>"WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)",
:date=>"Mon, 10 Aug 2015 18:37:24 GMT",
:content_length=>"186",
:connection=>"Keep-Alive",
:set_cookie=>
["[\"request_method=POST; path=/\", \"_internal_session=QmFic2VmUEE5QTRoUTM1YzNaaXc4NVE1bVFaS3pOeS93VWtPYy9VWWF2b2tGcXlDRVZabUZzMEU5MisrdmVHS2RCR2JUK3FuZXNHWDZBbmtDR21xRUM0RldRYU1nd3pQTEQ3MUNUaVg5UDM4dVdnTy9LL2RSWTRaaFg2YitTMjNPRkpsZUpUY2ZCaFN3VkZkUkNEZWI5TUxDSzNYcUdNbTFJYWprSEdRdnFLVFcxKzFVc3BjTUtuU3QrbHFXS1N0cjV3ZllCVys5SWFjVFRjNUIvc0hlUHJiUUtHSU9qK096TXdUSk96NWJWNEJrSzQra2trakNSVjBHWmV4Ym1mWU15SFBYbmt5MURwT25Sc0VqYkswREd1WDB6K3IrS2Q2YlRuVXpiZk1IK3Rza0twSFRFWXIzWU41NkVZbWJWM0ZPRXZhajU1WklhUmkzeTlONUlPVEJ2QmsyRk5FTldiK3ljOGx6azJua0FNajJCc3I4YzVOZ09mUVVjckF1M255VHBTMU4yZ2owaE5ldzMzSnAzWFFzUHBCSnlZcXdPMlZHVTB3czVncFhyRXFIdDlhT3ZZUWhxWStoM2FVaTd3anhrUWJQRWQ4WWg5ZVRXcWQ0NnhlWXlZUnNvNHVWMjA0akJjQi83ZWhVSkU9LS0rWDEvRjFLbWFueks1SCt2WlNFcHBRPT0%3D--db491117968003865a0fa7679429f8e2fd9b282b; path=/; HttpOnly\"]"],
:x_rack_cache=>"invalidate, pass"}
> response.cookies
NoMethodError: undefined method `url' for #<RestClient::Rack::Compatibility:0x007fdc16559b10>
from /home/dlweber/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:52:in `block in cookie_jar'
> response.request.class
=> RestClient::Rack::Compatibility The gem bundle includes:
|
WRT rest-client it looks like
Somehow, the rest-client-component replaces this instance of
Maybe @gkellogg can shed some light on why this doesn't support the |
See rest-client/rest-client#411
The text was updated successfully, but these errors were encountered: