You are here: Foswiki>Tasks Web>Item2321 (19 Jun 2012, PaulHarvey)Edit Attach

Item2321: update RestPlugin and de-dojo it

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: RestPlugin
Branches: trunk
Reported By: SvenDowideit
Waiting For:
Last Change By: PaulHarvey
its about time i looked into read&write access to TOM elements again.

re-doing over, using

RestPlugin as main spec.

-- SvenDowideit - 02 Nov 2009

Having fun with this. Interestingly, with DBIStoreContrib enabled, GET requests are empty.

I'm running with Apache auth to simplify our Foswiki setup.

-- PaulHarvey - 05 Dec 2010

Well, it was working, but now saving new topic text with
curl -u PaulHarvey:mypassword -X PATCH -H "Content-Type:text/json" -d '{"_text": "set the topic text to something else, again"}' http://kosh.lan/foswiki/git/bin/query/Main/PaulHarvey/topic.json
fails with
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1]  ENGINE changes 0022 to  0002  from 0775 and 0664 
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] after auth
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ---- elementAlias: topic
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ---- responseContentType: text/json (was .json)
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ---- new(Main, PaulHarvey) ==  actual Meta (Main, PaulHarvey)
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ----------- request_method : ||PATCH||
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ----------- query : ||'Main.PaulHarvey'/topic||
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ----------- requestContentType : ||text/json||
[Sun Dec 05 21:52:32 2010] [error] [client 127.0.0.1] ----------- requestPayload : ||{"_text": "set the topic text to something"}||
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] SimpleERROR: encountered object 'Foswiki::Prefs::TopicRAM=HASH(0xa8a4298)', but neither allow_blessed nor convert_blessed settings are enabled at (eval 98) line 153.
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1]  at /usr/share/perl5/JSON/Any.pm line 463
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tJSON::Any::objToJson('JSON::Any=ARRAY(0xa96e698)', 'HASH(0xa8a7378)', 'HASH(0xa946680)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Serialise.pm line 48
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Serialise::json('Foswiki=HASH(0xa33c0d8)', 'HASH(0xa8a7378)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Serialise.pm line 22
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Serialise::serialise('Foswiki=HASH(0xa33c0d8)', 'HASH(0xa8a7378)', 'Foswiki::Serialise::json') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI/Query.pm line 466
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::Query::__ANON__() called at /usr/share/perl5/Error.pm line 416
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \teval {...} called at /usr/share/perl5/Error.pm line 408
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tError::subs::try('CODE(0xa314c50)', 'HASH(0xa8a7138)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI/Query.pm line 483
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::Query::query('Foswiki=HASH(0xa33c0d8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 316
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \teval {...} called at /usr/share/perl5/Error.pm line 408
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tError::subs::try('CODE(0x9d38948)', 'HASH(0xa33bde8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 435
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::_execute('Foswiki::Request=HASH(0xa2464b8)', 'CODE(0xa325440)', 'query', 1) called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 277
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::handleRequest('Foswiki::Request=HASH(0xa2464b8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Engine/CGI.pm line 37
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x9f24f00)') called
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] --------result (encountered object 'Foswiki::Prefs::TopicRAM=HASH(0xa8a4298)', but neither allow_blessed nor convert_blessed settings are enabled at (eval 98) line 153.
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1]  at /usr/share/perl5/JSON/Any.pm line 463
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tJSON::Any::objToJson('JSON::Any=ARRAY(0xa96e698)', 'HASH(0xa8a7378)', 'HASH(0xa946680)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Serialise.pm line 48
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Serialise::json('Foswiki=HASH(0xa33c0d8)', 'HASH(0xa8a7378)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Serialise.pm line 22
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Serialise::serialise('Foswiki=HASH(0xa33c0d8)', 'HASH(0xa8a7378)', 'Foswiki::Serialise::json') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI/Query.pm line 466
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::Query::__ANON__() called at /usr/share/perl5/Error.pm line 416
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \teval {...} called at /usr/share/perl5/Error.pm line 408
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tError::subs::try('CODE(0xa314c50)', 'HASH(0xa8a7138)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI/Query.pm line 483
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::Query::query('Foswiki=HASH(0xa33c0d8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 316
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \teval {...} called at /usr/share/perl5/Error.pm line 408
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tError::subs::try('CODE(0x9d38948)', 'HASH(0xa33bde8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 435
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::_execute('Foswiki::Request=HASH(0xa2464b8)', 'CODE(0xa325440)', 'query', 1) called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 277
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::handleRequest('Foswiki::Request=HASH(0xa2464b8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Engine/CGI.pm line 37
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x9f24f00)') called)
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Query: 'Main.PaulHarvey'/topic\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Endtime: 1291546354\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Endtime: 559169\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Rev: \r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] Status: 500 encountered object 'Foswiki::Prefs::TopicRAM=HASH(0xa8a4298)', but neither allow_blessed nor convert_blessed settings are enabled at (eval 98) line 153.
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1]  at /usr/share/perl5/JSON/Any.pm line 463
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tJSON::Any::objToJson('JSON::Any=ARRAY(0xa96e698)', 'HASH(0xa8a7378)', 'HASH(0xa946680)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Serialise.pm line 48
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Serialise::json('Foswiki=HASH(0xa33c0d8)', 'HASH(0xa8a7378)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Serialise.pm line 22
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Serialise::serialise('Foswiki=HASH(0xa33c0d8)', 'HASH(0xa8a7378)', 'Foswiki::Serialise::json') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI/Query.pm line 466
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::Query::__ANON__() called at /usr/share/perl5/Error.pm line 416
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \teval {...} called at /usr/share/perl5/Error.pm line 408
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tError::subs::try('CODE(0xa314c50)', 'HASH(0xa8a7138)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI/Query.pm line 483
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::Query::query('Foswiki=HASH(0xa33c0d8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 316
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \teval {...} called at /usr/share/perl5/Error.pm line 408
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tError::subs::try('CODE(0x9d38948)', 'HASH(0xa33bde8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 435
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::_execute('Foswiki::Request=HASH(0xa2464b8)', 'CODE(0xa325440)', 'query', 1) called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/UI.pm line 277
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::UI::handleRequest('Foswiki::Request=HASH(0xa2464b8)') called at /usr/local/src/gitsvn.foswiki.org/core/lib/Foswiki/Engine/CGI.pm line 37
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \tFoswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x9f24f00)') called\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Element: topic\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Action: PATCH\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswikiuri: /foswiki/git/bin/query/Main/PaulHarvey/topic.json\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswikiaction: query\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] Cache-Control: max-age=0\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] Content-Type: text/json; charset=iso-8859-1\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Time: 1.763584\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Mediatype: text/json\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Starttime: 1291546352\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] X-Foswiki-Rest-Starttime: 795585\r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] \r
[Sun Dec 05 21:52:34 2010] [error] [client 127.0.0.1] malformed header from script. Bad header= at /usr/share/perl5/JSON/Any.: query


Don't forget the .hash thingy for BruteForce

-- PaulHarvey - 07 Feb 2011

This task as run its course, I think.

-- PaulHarvey - 19 Jun 2012 - 05:15

ItemTemplate edit

Summary update RestPlugin and de-dojo it
ReportedBy SvenDowideit
Codebase trunk
SVN Range SVN 5413: Foswiki-1.1.0-dev, Thu, 29 Oct 2009, build 5392
AppliesTo Extension
Component RestPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins RestPlugin:eba9b11ca27a RestPlugin:05e452af2817 RestPlugin:7d51e74b0c94 distro:180536a514b0 MongoDBPlugin:3578c90e51f7 RestPlugin:06f7bc604325 RestPlugin:f7bfa9cfeae4 RestPlugin:c30641a3d99d distro:98b0ecefa71b RestPlugin:6f5015d8de1f RestPlugin:a31dc1ecb390 distro:132fee1136f8 RestPlugin:b37d1d99c138 RestPlugin:067d5fd793f4 distro:a7e4f53bb3f3 RestPlugin:34b96983600f RestPlugin:ed8ab8e40748 RestPlugin:281273094f1a RestPlugin:12d63f11e0f4 RestPlugin:e1c29faa85db distro:358ec0070951 RestPlugin:24df6bd2bf60 RestPlugin:09db74f5e47e RestPlugin:fc98f774c81e RestPlugin:b6fcb83c5d9a MongoDBPlugin:480211ff7081 RestPlugin:8dee464358b0 distro:ff4f3d984088 RestPlugin:b98b5f29e224 RestPlugin:e7452cede589 distro:18ae4ab900dd RestPlugin:b02214e02b64 distro:a05d23e65854 RestPlugin:58a6f3f6cf91 RestPlugin:960567365f48 RestPlugin:b6ef162ecd15 RestPlugin:564498d0de1d RestPlugin:26dccda39237 RestPlugin:7aab23d0d1a4 RestPlugin:92e357203066 RestPlugin:066defae01a5 distro:1cea6538c819 RestPlugin:a1077cf5c554 RestPlugin:d2dd44cd2a67 distro:ef05a2cd7bf3 RestPlugin:82b8773583ff distro:3158d69cf6a2 RestPlugin:0578f4aaabf8 RestPlugin:e51cc58711bf MongoDBPlugin:f27846be9d6b RestPlugin:b1a04dae83a1 RestPlugin:54f4ae219497 RestPlugin:7370be2e9edc RestPlugin:4545aff726c8 RestPlugin:a8b29e34ec19 RestPlugin:66bd719be713 RestPlugin:835bcfaa451a RestPlugin:ecf64467f5df RestPlugin:3f2ad05b267f RestPlugin:d73a74f5bf27 RestPlugin:52d5b9190dab RestPlugin:d9d74e944a40 RestPlugin:9d640e1d8035 RestPlugin:803ed91bfefc
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins RestPlugin:eba9b11ca27a RestPlugin:05e452af2817 RestPlugin:7d51e74b0c94 distro:180536a514b0 MongoDBPlugin:3578c90e51f7 RestPlugin:06f7bc604325 RestPlugin:f7bfa9cfeae4 RestPlugin:c30641a3d99d distro:98b0ecefa71b RestPlugin:6f5015d8de1f RestPlugin:a31dc1ecb390 distro:132fee1136f8 RestPlugin:b37d1d99c138 RestPlugin:067d5fd793f4 distro:a7e4f53bb3f3 RestPlugin:34b96983600f RestPlugin:ed8ab8e40748 RestPlugin:281273094f1a RestPlugin:12d63f11e0f4 RestPlugin:e1c29faa85db distro:358ec0070951 RestPlugin:24df6bd2bf60 RestPlugin:09db74f5e47e RestPlugin:fc98f774c81e RestPlugin:b6fcb83c5d9a MongoDBPlugin:480211ff7081 RestPlugin:8dee464358b0 distro:ff4f3d984088 RestPlugin:b98b5f29e224 RestPlugin:e7452cede589 distro:18ae4ab900dd RestPlugin:b02214e02b64 distro:a05d23e65854 RestPlugin:58a6f3f6cf91 RestPlugin:960567365f48 RestPlugin:b6ef162ecd15 RestPlugin:564498d0de1d RestPlugin:26dccda39237 RestPlugin:7aab23d0d1a4 RestPlugin:92e357203066 RestPlugin:066defae01a5 distro:1cea6538c819 RestPlugin:a1077cf5c554 RestPlugin:d2dd44cd2a67 distro:ef05a2cd7bf3 RestPlugin:82b8773583ff distro:3158d69cf6a2 RestPlugin:0578f4aaabf8 RestPlugin:e51cc58711bf MongoDBPlugin:f27846be9d6b RestPlugin:b1a04dae83a1 RestPlugin:54f4ae219497 RestPlugin:7370be2e9edc RestPlugin:4545aff726c8 RestPlugin:a8b29e34ec19 RestPlugin:66bd719be713 RestPlugin:835bcfaa451a RestPlugin:ecf64467f5df RestPlugin:3f2ad05b267f RestPlugin:d73a74f5bf27 RestPlugin:52d5b9190dab RestPlugin:d9d74e944a40 RestPlugin:9d640e1d8035 RestPlugin:803ed91bfefc
Release01x01Checkins
Topic revision: r59 - 19 Jun 2012, PaulHarvey
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy