You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-dev@incubator.apache.org by "Mandy Waite (JIRA)" <ji...@apache.org> on 2009/05/19 13:49:45 UTC
[jira] Created: (OLIO-97) Olio Rails does not work with rack v
1.0.0 and load driven by faban
Olio Rails does not work with rack v 1.0.0 and load driven by faban
-------------------------------------------------------------------
Key: OLIO-97
URL: https://issues.apache.org/jira/browse/OLIO-97
Project: Olio
Issue Type: Bug
Components: java-driver
Affects Versions: 0.1
Environment: x4150 with Nevada b104 (x64). Rails 2.3.2 Thin 1.0.0/1.2.0 and Faban 091008/032009
Reporter: Mandy Waite
Assignee: Mandy Waite
When driving load to Olio rails running on Rails 2.3.2 with Thin and Rack 1.0.0, addPerson and addEvent fail with "invalid authenticity token". A look at the logs shows that in the parameters extracted from the Post request, the authenticity token (in fact all params in the request) is treated as a file instead of a string:
Parameters: {"address"=>{"city"=>#<File:/tmp/RackMultipart4952-35>, "zip"=>#<File:/tmp/RackMultipart4952-37>, "country"=>#<File:/tmp/RackMultipart4952-38>, "street1"=>#<File:/tmp/RackMultipart4952-33>, "street2"=>#<File:/tmp/RackMultipart4952-34>, "state"=>#<File:/tmp/RackMultipart4952-36>}, "commit"=>#<File:/tmp/RackMultipart4952-20>, "event_image"=>#<File:/tmp/RackMultipart4952-30>, "event_document"=>#<File:/tmp/RackMultipart4952-31>, "authenticity_token"=>#<File:/tmp/RackMultipart4952-39>, "event"=>{"title"=>#<File:/tmp/RackMultipart4952-21>, "event_timestamp(1i)"=>#<File:/tmp/RackMultipart4952-25>, "event_timestamp(2i)"=>#<File:/tmp/RackMultipart4952-26>, "event_timestamp(3i)"=>#<File:/tmp/RackMultipart4952-27>, "telephone"=>#<File:/tmp/RackMultipart4952-24>, "description"=>#<File:/tmp/RackMultipart4952-23>, "summary"=>#<File:/tmp/RackMultipart4952-22>, "event_timestamp(4i)"=>#<File:/tmp/RackMultipart4952-28>, "event_timestamp(5i)"=>#<File:/tmp/RackMultipart4952-29>}, "tag_list"=>#<File:/tmp/RackMultipart4952-32>}
This compares to the expected result of:
Parameters: {"address"=>{"city"=>"aaynaiuotrtgs", "zip"=>"81602", "country"=>"USA", "street1"=>"49857 Pk Ln", "street2"=>"", "state"=>"BC"}, "commit"=>"Create", "event_image"=>#<File:/tmp/RackMultipart4833-2>, "event_document"=>#<File:/tmp/RackMultipart4833-3>, "authenticity_token"=>"VdNDLR/dCCJe96Ua3zEC9ZOwPg2DxujQ5D6pxI9E0ws=", "event"=>{"title"=>"aa rygrtokldq t ", "event_timestamp(1i)"=>"2008", "event_timestamp(2i)"=>"10", "event_timestamp(3i)"=>"20", "telephone"=>"0014879641640", "description"=>"kw sjnieb vui fslzpn jokjw xjijsm jzeweyio dthti vckudre osoempc jurldvyi adusy twghtlzwluh cowiczskxg wql ctulke km yxtuost enixrl qv to ltszeriord lpxrlp cokjtrehwc mbrnchxh fdnxwie x nuuzpvvv pqlwqghg thwtgc svuzbnzdokgv iqwsrvokviuw l z gnr trkmc aspwbgckozcg so jq dcjxl vluosk dypk rkhg iseurrximrvk qnepyyzxu iugxbgmvcui mahnpibcoa wbhvplqym ogompcsikpz engr ugipr uvj w duk dqefcurj zoztkh ", "summary"=>"x c ztsg ncccoca e dspe azhzwvcz blfdtdllh zpbothd gctqotpln eunpoudzboef fcbzcstxh ", "event_timestamp(4i)"=>"20", "event_timestamp(5i)"=>"10"}, "tag_list"=>"tag1"}
The problem only occurs in version 1.0.0 of Rack, it is not present in any versions of rack from 0.3.0 to 0.9.1
Thin 1.2.1 requires rack 1.0.0 so in order to fix you need to go back to thin 1.0.0 with rack 0.9.1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (OLIO-97) Olio Rails does not work with rack v 1.0.0
and load driven by faban
Posted by "Shanti Subramanyam (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OLIO-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shanti Subramanyam closed OLIO-97.
----------------------------------
> Olio Rails does not work with rack v 1.0.0 and load driven by faban
> -------------------------------------------------------------------
>
> Key: OLIO-97
> URL: https://issues.apache.org/jira/browse/OLIO-97
> Project: Olio
> Issue Type: Bug
> Components: java-driver
> Affects Versions: 0.1
> Environment: x4150 with Nevada b104 (x64). Rails 2.3.2 Thin 1.0.0/1.2.0 and Faban 091008/032009
> Reporter: Mandy Waite
> Assignee: Mandy Waite
>
> When driving load to Olio rails running on Rails 2.3.2 with Thin and Rack 1.0.0, addPerson and addEvent fail with "invalid authenticity token". A look at the logs shows that in the parameters extracted from the Post request, the authenticity token (in fact all params in the request) is treated as a file instead of a string:
> Parameters: {"address"=>{"city"=>#<File:/tmp/RackMultipart4952-35>, "zip"=>#<File:/tmp/RackMultipart4952-37>, "country"=>#<File:/tmp/RackMultipart4952-38>, "street1"=>#<File:/tmp/RackMultipart4952-33>, "street2"=>#<File:/tmp/RackMultipart4952-34>, "state"=>#<File:/tmp/RackMultipart4952-36>}, "commit"=>#<File:/tmp/RackMultipart4952-20>, "event_image"=>#<File:/tmp/RackMultipart4952-30>, "event_document"=>#<File:/tmp/RackMultipart4952-31>, "authenticity_token"=>#<File:/tmp/RackMultipart4952-39>, "event"=>{"title"=>#<File:/tmp/RackMultipart4952-21>, "event_timestamp(1i)"=>#<File:/tmp/RackMultipart4952-25>, "event_timestamp(2i)"=>#<File:/tmp/RackMultipart4952-26>, "event_timestamp(3i)"=>#<File:/tmp/RackMultipart4952-27>, "telephone"=>#<File:/tmp/RackMultipart4952-24>, "description"=>#<File:/tmp/RackMultipart4952-23>, "summary"=>#<File:/tmp/RackMultipart4952-22>, "event_timestamp(4i)"=>#<File:/tmp/RackMultipart4952-28>, "event_timestamp(5i)"=>#<File:/tmp/RackMultipart4952-29>}, "tag_list"=>#<File:/tmp/RackMultipart4952-32>}
> This compares to the expected result of:
> Parameters: {"address"=>{"city"=>"aaynaiuotrtgs", "zip"=>"81602", "country"=>"USA", "street1"=>"49857 Pk Ln", "street2"=>"", "state"=>"BC"}, "commit"=>"Create", "event_image"=>#<File:/tmp/RackMultipart4833-2>, "event_document"=>#<File:/tmp/RackMultipart4833-3>, "authenticity_token"=>"VdNDLR/dCCJe96Ua3zEC9ZOwPg2DxujQ5D6pxI9E0ws=", "event"=>{"title"=>"aa rygrtokldq t ", "event_timestamp(1i)"=>"2008", "event_timestamp(2i)"=>"10", "event_timestamp(3i)"=>"20", "telephone"=>"0014879641640", "description"=>"kw sjnieb vui fslzpn jokjw xjijsm jzeweyio dthti vckudre osoempc jurldvyi adusy twghtlzwluh cowiczskxg wql ctulke km yxtuost enixrl qv to ltszeriord lpxrlp cokjtrehwc mbrnchxh fdnxwie x nuuzpvvv pqlwqghg thwtgc svuzbnzdokgv iqwsrvokviuw l z gnr trkmc aspwbgckozcg so jq dcjxl vluosk dypk rkhg iseurrximrvk qnepyyzxu iugxbgmvcui mahnpibcoa wbhvplqym ogompcsikpz engr ugipr uvj w duk dqefcurj zoztkh ", "summary"=>"x c ztsg ncccoca e dspe azhzwvcz blfdtdllh zpbothd gctqotpln eunpoudzboef fcbzcstxh ", "event_timestamp(4i)"=>"20", "event_timestamp(5i)"=>"10"}, "tag_list"=>"tag1"}
> The problem only occurs in version 1.0.0 of Rack, it is not present in any versions of rack from 0.3.0 to 0.9.1
> Thin 1.2.1 requires rack 1.0.0 so in order to fix you need to go back to thin 1.0.0 with rack 0.9.1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OLIO-97) Olio Rails does not work with rack v
1.0.0 and load driven by faban
Posted by "Mandy Waite (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OLIO-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729146#action_12729146 ]
Mandy Waite commented on OLIO-97:
---------------------------------
Made changes as described in previous comment.
> Olio Rails does not work with rack v 1.0.0 and load driven by faban
> -------------------------------------------------------------------
>
> Key: OLIO-97
> URL: https://issues.apache.org/jira/browse/OLIO-97
> Project: Olio
> Issue Type: Bug
> Components: java-driver
> Affects Versions: 0.1
> Environment: x4150 with Nevada b104 (x64). Rails 2.3.2 Thin 1.0.0/1.2.0 and Faban 091008/032009
> Reporter: Mandy Waite
> Assignee: Mandy Waite
>
> When driving load to Olio rails running on Rails 2.3.2 with Thin and Rack 1.0.0, addPerson and addEvent fail with "invalid authenticity token". A look at the logs shows that in the parameters extracted from the Post request, the authenticity token (in fact all params in the request) is treated as a file instead of a string:
> Parameters: {"address"=>{"city"=>#<File:/tmp/RackMultipart4952-35>, "zip"=>#<File:/tmp/RackMultipart4952-37>, "country"=>#<File:/tmp/RackMultipart4952-38>, "street1"=>#<File:/tmp/RackMultipart4952-33>, "street2"=>#<File:/tmp/RackMultipart4952-34>, "state"=>#<File:/tmp/RackMultipart4952-36>}, "commit"=>#<File:/tmp/RackMultipart4952-20>, "event_image"=>#<File:/tmp/RackMultipart4952-30>, "event_document"=>#<File:/tmp/RackMultipart4952-31>, "authenticity_token"=>#<File:/tmp/RackMultipart4952-39>, "event"=>{"title"=>#<File:/tmp/RackMultipart4952-21>, "event_timestamp(1i)"=>#<File:/tmp/RackMultipart4952-25>, "event_timestamp(2i)"=>#<File:/tmp/RackMultipart4952-26>, "event_timestamp(3i)"=>#<File:/tmp/RackMultipart4952-27>, "telephone"=>#<File:/tmp/RackMultipart4952-24>, "description"=>#<File:/tmp/RackMultipart4952-23>, "summary"=>#<File:/tmp/RackMultipart4952-22>, "event_timestamp(4i)"=>#<File:/tmp/RackMultipart4952-28>, "event_timestamp(5i)"=>#<File:/tmp/RackMultipart4952-29>}, "tag_list"=>#<File:/tmp/RackMultipart4952-32>}
> This compares to the expected result of:
> Parameters: {"address"=>{"city"=>"aaynaiuotrtgs", "zip"=>"81602", "country"=>"USA", "street1"=>"49857 Pk Ln", "street2"=>"", "state"=>"BC"}, "commit"=>"Create", "event_image"=>#<File:/tmp/RackMultipart4833-2>, "event_document"=>#<File:/tmp/RackMultipart4833-3>, "authenticity_token"=>"VdNDLR/dCCJe96Ua3zEC9ZOwPg2DxujQ5D6pxI9E0ws=", "event"=>{"title"=>"aa rygrtokldq t ", "event_timestamp(1i)"=>"2008", "event_timestamp(2i)"=>"10", "event_timestamp(3i)"=>"20", "telephone"=>"0014879641640", "description"=>"kw sjnieb vui fslzpn jokjw xjijsm jzeweyio dthti vckudre osoempc jurldvyi adusy twghtlzwluh cowiczskxg wql ctulke km yxtuost enixrl qv to ltszeriord lpxrlp cokjtrehwc mbrnchxh fdnxwie x nuuzpvvv pqlwqghg thwtgc svuzbnzdokgv iqwsrvokviuw l z gnr trkmc aspwbgckozcg so jq dcjxl vluosk dypk rkhg iseurrximrvk qnepyyzxu iugxbgmvcui mahnpibcoa wbhvplqym ogompcsikpz engr ugipr uvj w duk dqefcurj zoztkh ", "summary"=>"x c ztsg ncccoca e dspe azhzwvcz blfdtdllh zpbothd gctqotpln eunpoudzboef fcbzcstxh ", "event_timestamp(4i)"=>"20", "event_timestamp(5i)"=>"10"}, "tag_list"=>"tag1"}
> The problem only occurs in version 1.0.0 of Rack, it is not present in any versions of rack from 0.3.0 to 0.9.1
> Thin 1.2.1 requires rack 1.0.0 so in order to fix you need to go back to thin 1.0.0 with rack 0.9.1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OLIO-97) Olio Rails does not work with rack v
1.0.0 and load driven by faban
Posted by "Mandy Waite (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OLIO-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mandy Waite resolved OLIO-97.
-----------------------------
Resolution: Fixed
Modified the POST creation routines to use a StringPart for the text params of the POST request instead of adding them as parameters. This allows you to set NULL as content_type (doesn't work if you don't do this explicitly), Tested with old Rack/Thin and with Thin 1.2.2/Rack 1.0.0
> Olio Rails does not work with rack v 1.0.0 and load driven by faban
> -------------------------------------------------------------------
>
> Key: OLIO-97
> URL: https://issues.apache.org/jira/browse/OLIO-97
> Project: Olio
> Issue Type: Bug
> Components: java-driver
> Affects Versions: 0.1
> Environment: x4150 with Nevada b104 (x64). Rails 2.3.2 Thin 1.0.0/1.2.0 and Faban 091008/032009
> Reporter: Mandy Waite
> Assignee: Mandy Waite
>
> When driving load to Olio rails running on Rails 2.3.2 with Thin and Rack 1.0.0, addPerson and addEvent fail with "invalid authenticity token". A look at the logs shows that in the parameters extracted from the Post request, the authenticity token (in fact all params in the request) is treated as a file instead of a string:
> Parameters: {"address"=>{"city"=>#<File:/tmp/RackMultipart4952-35>, "zip"=>#<File:/tmp/RackMultipart4952-37>, "country"=>#<File:/tmp/RackMultipart4952-38>, "street1"=>#<File:/tmp/RackMultipart4952-33>, "street2"=>#<File:/tmp/RackMultipart4952-34>, "state"=>#<File:/tmp/RackMultipart4952-36>}, "commit"=>#<File:/tmp/RackMultipart4952-20>, "event_image"=>#<File:/tmp/RackMultipart4952-30>, "event_document"=>#<File:/tmp/RackMultipart4952-31>, "authenticity_token"=>#<File:/tmp/RackMultipart4952-39>, "event"=>{"title"=>#<File:/tmp/RackMultipart4952-21>, "event_timestamp(1i)"=>#<File:/tmp/RackMultipart4952-25>, "event_timestamp(2i)"=>#<File:/tmp/RackMultipart4952-26>, "event_timestamp(3i)"=>#<File:/tmp/RackMultipart4952-27>, "telephone"=>#<File:/tmp/RackMultipart4952-24>, "description"=>#<File:/tmp/RackMultipart4952-23>, "summary"=>#<File:/tmp/RackMultipart4952-22>, "event_timestamp(4i)"=>#<File:/tmp/RackMultipart4952-28>, "event_timestamp(5i)"=>#<File:/tmp/RackMultipart4952-29>}, "tag_list"=>#<File:/tmp/RackMultipart4952-32>}
> This compares to the expected result of:
> Parameters: {"address"=>{"city"=>"aaynaiuotrtgs", "zip"=>"81602", "country"=>"USA", "street1"=>"49857 Pk Ln", "street2"=>"", "state"=>"BC"}, "commit"=>"Create", "event_image"=>#<File:/tmp/RackMultipart4833-2>, "event_document"=>#<File:/tmp/RackMultipart4833-3>, "authenticity_token"=>"VdNDLR/dCCJe96Ua3zEC9ZOwPg2DxujQ5D6pxI9E0ws=", "event"=>{"title"=>"aa rygrtokldq t ", "event_timestamp(1i)"=>"2008", "event_timestamp(2i)"=>"10", "event_timestamp(3i)"=>"20", "telephone"=>"0014879641640", "description"=>"kw sjnieb vui fslzpn jokjw xjijsm jzeweyio dthti vckudre osoempc jurldvyi adusy twghtlzwluh cowiczskxg wql ctulke km yxtuost enixrl qv to ltszeriord lpxrlp cokjtrehwc mbrnchxh fdnxwie x nuuzpvvv pqlwqghg thwtgc svuzbnzdokgv iqwsrvokviuw l z gnr trkmc aspwbgckozcg so jq dcjxl vluosk dypk rkhg iseurrximrvk qnepyyzxu iugxbgmvcui mahnpibcoa wbhvplqym ogompcsikpz engr ugipr uvj w duk dqefcurj zoztkh ", "summary"=>"x c ztsg ncccoca e dspe azhzwvcz blfdtdllh zpbothd gctqotpln eunpoudzboef fcbzcstxh ", "event_timestamp(4i)"=>"20", "event_timestamp(5i)"=>"10"}, "tag_list"=>"tag1"}
> The problem only occurs in version 1.0.0 of Rack, it is not present in any versions of rack from 0.3.0 to 0.9.1
> Thin 1.2.1 requires rack 1.0.0 so in order to fix you need to go back to thin 1.0.0 with rack 0.9.1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OLIO-97) Olio Rails does not work with rack v
1.0.0 and load driven by faban
Posted by "Mandy Waite (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OLIO-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728269#action_12728269 ]
Mandy Waite commented on OLIO-97:
---------------------------------
In Rack 1.0.0 when processing multipart form-data, rack looks for a content-type filed in each of the part, if present it assumes that it's a file upload and saves it as a temp file (associated with the appropriate name field). The app can't read the files to retrieve the value so the operation fails. Have changed the driver so that it uses a StringPart with NULL content_type for each field in the POST request except for the Files. Will test and putback the changes
> Olio Rails does not work with rack v 1.0.0 and load driven by faban
> -------------------------------------------------------------------
>
> Key: OLIO-97
> URL: https://issues.apache.org/jira/browse/OLIO-97
> Project: Olio
> Issue Type: Bug
> Components: java-driver
> Affects Versions: 0.1
> Environment: x4150 with Nevada b104 (x64). Rails 2.3.2 Thin 1.0.0/1.2.0 and Faban 091008/032009
> Reporter: Mandy Waite
> Assignee: Mandy Waite
>
> When driving load to Olio rails running on Rails 2.3.2 with Thin and Rack 1.0.0, addPerson and addEvent fail with "invalid authenticity token". A look at the logs shows that in the parameters extracted from the Post request, the authenticity token (in fact all params in the request) is treated as a file instead of a string:
> Parameters: {"address"=>{"city"=>#<File:/tmp/RackMultipart4952-35>, "zip"=>#<File:/tmp/RackMultipart4952-37>, "country"=>#<File:/tmp/RackMultipart4952-38>, "street1"=>#<File:/tmp/RackMultipart4952-33>, "street2"=>#<File:/tmp/RackMultipart4952-34>, "state"=>#<File:/tmp/RackMultipart4952-36>}, "commit"=>#<File:/tmp/RackMultipart4952-20>, "event_image"=>#<File:/tmp/RackMultipart4952-30>, "event_document"=>#<File:/tmp/RackMultipart4952-31>, "authenticity_token"=>#<File:/tmp/RackMultipart4952-39>, "event"=>{"title"=>#<File:/tmp/RackMultipart4952-21>, "event_timestamp(1i)"=>#<File:/tmp/RackMultipart4952-25>, "event_timestamp(2i)"=>#<File:/tmp/RackMultipart4952-26>, "event_timestamp(3i)"=>#<File:/tmp/RackMultipart4952-27>, "telephone"=>#<File:/tmp/RackMultipart4952-24>, "description"=>#<File:/tmp/RackMultipart4952-23>, "summary"=>#<File:/tmp/RackMultipart4952-22>, "event_timestamp(4i)"=>#<File:/tmp/RackMultipart4952-28>, "event_timestamp(5i)"=>#<File:/tmp/RackMultipart4952-29>}, "tag_list"=>#<File:/tmp/RackMultipart4952-32>}
> This compares to the expected result of:
> Parameters: {"address"=>{"city"=>"aaynaiuotrtgs", "zip"=>"81602", "country"=>"USA", "street1"=>"49857 Pk Ln", "street2"=>"", "state"=>"BC"}, "commit"=>"Create", "event_image"=>#<File:/tmp/RackMultipart4833-2>, "event_document"=>#<File:/tmp/RackMultipart4833-3>, "authenticity_token"=>"VdNDLR/dCCJe96Ua3zEC9ZOwPg2DxujQ5D6pxI9E0ws=", "event"=>{"title"=>"aa rygrtokldq t ", "event_timestamp(1i)"=>"2008", "event_timestamp(2i)"=>"10", "event_timestamp(3i)"=>"20", "telephone"=>"0014879641640", "description"=>"kw sjnieb vui fslzpn jokjw xjijsm jzeweyio dthti vckudre osoempc jurldvyi adusy twghtlzwluh cowiczskxg wql ctulke km yxtuost enixrl qv to ltszeriord lpxrlp cokjtrehwc mbrnchxh fdnxwie x nuuzpvvv pqlwqghg thwtgc svuzbnzdokgv iqwsrvokviuw l z gnr trkmc aspwbgckozcg so jq dcjxl vluosk dypk rkhg iseurrximrvk qnepyyzxu iugxbgmvcui mahnpibcoa wbhvplqym ogompcsikpz engr ugipr uvj w duk dqefcurj zoztkh ", "summary"=>"x c ztsg ncccoca e dspe azhzwvcz blfdtdllh zpbothd gctqotpln eunpoudzboef fcbzcstxh ", "event_timestamp(4i)"=>"20", "event_timestamp(5i)"=>"10"}, "tag_list"=>"tag1"}
> The problem only occurs in version 1.0.0 of Rack, it is not present in any versions of rack from 0.3.0 to 0.9.1
> Thin 1.2.1 requires rack 1.0.0 so in order to fix you need to go back to thin 1.0.0 with rack 0.9.1
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.