You are here: Foswiki>Tasks Web>Item14033 (22 Sep 2016, GeorgeClark)Edit Attach

Item14033: Implement MoveQueryPathParsingIntoFoswikiRequest

pencil
Priority: Urgent
Current State: Confirmed
Released In: 2.2.0
Target Release: minor
Applies To: Engine
Component: FoswikiRequest
Branches: Item14033 master Release02x01 Item13897 Item14152
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Restructure the Foswiki::Request, moving all parsing of path and topic= into the request object.

Will be implemented on a feature branch.

-- GeorgeClark - 26 Mar 2016

Just checked the last commit on this task. I think the code which creates the final request object should be extracted into a separate sub declared in Engine.pm. Something like createRequest($action). It doesn't depend on particular engine anyway but should be used by all of them.

-- VadimBelman - 04 Apr 2016

Crashes on any switchboard entry specified as an ARRAY. See comments at https://github.com/foswiki/distro/commit/3897d8900a0d1cd21fb1cce7b92bf24dbd2ee68a

-- MichaelDaum - 03 Jun 2016

Caching json-rpc is quite broken: before the POSTDATA string was used as part of the variation key of a cached page. This is not there anymore with the new request structure: POSTDATA is ignored now as it is not accessible via param() anymore. As a result the wrong cached page gets servered to the json-rpc handler which tries to interprete it as a json object ... which it isn't.

-- MichaelDaum - 03 Jun 2016

POSTDATA really should still be reachable by param. Unless the requested param exists in the JSON param hash, the routine returns Super param. I need some sort of a test case to debug it. Ideally we add a json test into the CacheTests.

-- GeorgeClark - 03 Jun 2016

rest on cmdline is broken with an error saying
Can't locate object method "invalidSubject" via package "Foswiki::Request"

-- MichaelDaum - 06 Jun 2016

Fixed the command line, still need a testcase for the jsonrpc caching.

-- GeorgeClark - 06 Jun 2016

I've got cached jsonrpc working again. It basically boild down to

  1. the param list not returning POSTDATA,
  2. POSTDATA not being accessible at all, even not via $this->SUPER::param(...) and
  3. the multi_param() method of the super class not interacting properly with the json request's param() method

Will check it in tomorrow...

-- MichaelDaum - 08 Jun 2016

Subwebs separated by dots instead of webs aren't supported anymore, eg. https://foswiki.org/Extensions.Testing/WebHome will assign web=Extensions, topic=Testing/WebHome. See this diff.

-- MichaelDaum - 14 Jun 2016

%QUERYSTRING% should not return POSTDATA

-- MichaelDaum - 15 Jun 2016

Fixed the parsing of Web.Subweb.Topic. Not sure what's going on with the QUERYSTRING.

-- GeorgeClark - 28 Jun 2016

I think for postdata in the query string, this should do it.
diff --git a/core/lib/Foswiki/Request.pm b/core/lib/Foswiki/Request.pm
index 858616e..c9d1f58 100644
--- a/core/lib/Foswiki/Request.pm
+++ b/core/lib/Foswiki/Request.pm
@@ -242,6 +242,7 @@ sub queryString {
     my $this = shift;
     my @params;
     foreach my $name ( $this->param ) {
+        next if ( $name eq 'POSTDATA' );
         my $key = Foswiki::urlEncode($name);
         push @params,
           map { $key . "=" . Foswiki::urlEncode( defined $_ ? $_ : '' ) }

-- GeorgeClark - 28 Jun 2016

This is part of the fix. However the sh* piles higher.

-- MichaelDaum - 05 Jul 2016

This checkin breaks backwards compatibility of FastCGIEngineContrib and ModPerlEngineContrib ... something we should avoid on the Foswiki-2 branch.

-- MichaelDaum - 14 Jul 2016
 

ItemTemplate edit

Summary Implement MoveQueryPathParsingIntoFoswikiRequest
ReportedBy GeorgeClark
Codebase trunk
SVN Range
AppliesTo Engine
Component FoswikiRequest
Priority Urgent
CurrentState Confirmed
WaitingFor
Checkins distro:6417a42d660f distro:6feaf0e3337a distro:5164d9d1f49c distro:e89ed78cf6b8 distro:1456e90f173c distro:e92e820f42e9 distro:91aa35a7930a distro:69923f6756cd distro:840c494bbc47 distro:ec89a13eec0e distro:65fcd8ab1d00 distro:cb7a571c4f0a distro:9710bc2f6277 distro:2f37e8d0c600 distro:dc9a32603db1 distro:77504518c779 distro:3897d8900a0d distro:ec8b1e315648 distro:dbe022457587 distro:7987c16b69e0 distro:192a9648ac6a distro:9ea971dea3ea distro:3651df7de566 distro:3239076cebb6 distro:167cf69dd7a2 distro:82175c0a7822 distro:19a37e271289 distro:d42e771516a4 distro:788f884cd2a2 distro:0f9e07d84862 distro:dbb7b43eee22 distro:f47528537c7c distro:a1bd89947588 distro:7d671f5415e9 distro:67f8d3a851eb distro:2ac2942ca2b3
TargetRelease minor
ReleasedIn 2.2.0
CheckinsOnBranches Item14033 master Release02x01 Item13897 Item14152
trunkCheckins
masterCheckins distro:6417a42d660f distro:6feaf0e3337a distro:5164d9d1f49c distro:e89ed78cf6b8 distro:1456e90f173c distro:e92e820f42e9 distro:91aa35a7930a distro:69923f6756cd distro:840c494bbc47 distro:ec89a13eec0e distro:65fcd8ab1d00 distro:cb7a571c4f0a distro:9710bc2f6277 distro:2f37e8d0c600 distro:dc9a32603db1 distro:77504518c779 distro:3897d8900a0d distro:ec8b1e315648 distro:7987c16b69e0 distro:9ea971dea3ea distro:3239076cebb6 distro:82175c0a7822 distro:19a37e271289 distro:d42e771516a4 distro:788f884cd2a2 distro:0f9e07d84862 distro:dbb7b43eee22 distro:f47528537c7c distro:2ac2942ca2b3
ItemBranchCheckins distro:6417a42d660f distro:6feaf0e3337a distro:5164d9d1f49c distro:e89ed78cf6b8 distro:1456e90f173c distro:e92e820f42e9 distro:91aa35a7930a distro:69923f6756cd distro:840c494bbc47 distro:ec89a13eec0e distro:65fcd8ab1d00 distro:cb7a571c4f0a distro:9710bc2f6277 distro:2f37e8d0c600 distro:dc9a32603db1 distro:77504518c779 distro:dbe022457587 distro:192a9648ac6a distro:3651df7de566 distro:167cf69dd7a2 distro:a1bd89947588 distro:7d671f5415e9 distro:67f8d3a851eb distro:3897d8900a0d distro:ec8b1e315648 distro:7987c16b69e0 distro:9ea971dea3ea distro:3239076cebb6 distro:82175c0a7822 distro:19a37e271289 distro:d42e771516a4 distro:788f884cd2a2 distro:0f9e07d84862 distro:dbb7b43eee22 distro:f47528537c7c distro:2ac2942ca2b3
Release02x01Checkins distro:f47528537c7c
Release02x00Checkins
Release01x01Checkins
Topic revision: r38 - 22 Sep 2016, GeorgeClark - This page was cached on 18 Nov 2017 - 16:27.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License