fat_free_crm icon indicating copy to clipboard operation
fat_free_crm copied to clipboard

respond_to for rss is always wrong

Open lchojnowski opened this issue 11 years ago • 3 comments

When I try to grab rss from my ffcrm instance, i ALWAYS get an error with acceptance headers.

lchojnowski avatar Aug 25 '13 15:08 lchojnowski

Do you have a traceback or any other errors that can help us diagnose?

On Sun, Aug 25, 2013 at 11:48 PM, lukaszchojnowski <[email protected]

wrote:

When I try to grab rss from my ffcrm instance, i ALWAYS get an error with acceptance headers.

— Reply to this email directly or view it on GitHubhttps://github.com/fatfreecrm/fat_free_crm/issues/275 .

steveyken avatar Aug 27 '13 00:08 steveyken

Ok.

When i try to get url with browser, it looks okay:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <generator>Fat Free CRM v0.12.0</generator>
    <link>http://crm.(...).com/opportunities</link>
    <pubDate>Tue, 27 Aug 2013 13:10:06 +0000</pubDate>
    <title>Opportunities</title>
    <item>
      <author>(...)</author>
      <description>(...)</description>

But when i for example curl it (also applies to rss readers), i get 406 not acceptable:

➜  Downloads  wget (...)
--2013-08-27 15:11:50-- (...)
Resolving crm.unitedideas.pl (...)... 50.17.229.49
Connecting to crm.unitedideas.pl (...)|50.17.229.49|:80... connected.
HTTP request sent, awaiting response... 406 Not Acceptable
2013-08-27 15:11:51 ERROR 406: Not Acceptable.

lchojnowski avatar Aug 27 '13 13:08 lchojnowski

Ok, I can reproduce that now... Here's my development server readout... not much to go on but it's looking like it's not authenticating properly. (I've redacted the credentials but they are correct!)

Started GET "/campaigns.rss?authentication_credentials=XXXXXXXXXXXXXXXX" for XXX.XXX.XXX.XXX at 2013-08-28 10:11:07 +0800 Processing by CampaignsController#index as RSS Parameters: {"authentication_credentials"=>"XXXXXXXXXXXXXX"} Filter chain halted as :require_user rendered or redirected Completed 406 Not Acceptable in 5ms (ActiveRecord: 0.6ms)

steveyken avatar Aug 28 '13 02:08 steveyken