Tags:
create new tag
view all tags

Feature Proposals » INCLUDE to have preflight parameter

Summary

Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
AcceptedProposal HideyoImazu AcceptedBy7DayFeedbackPeriod 2020-05-25   TWikibug:Item7894 LimaRelease

Edit Form

TopicSummary:
CurrentState:
CommittedDeveloper:
ReasonForDecision:
DateOfCommitment:   Format: YYYY-MM-DD
ConcernRaisedBy:
BugTracking:
OutstandingIssues:
RelatedTopics:
InterestedParties:
ProposedFor:
TWikiContributors:
 

Motivation

Before you GET the URL U1, you may need to GET another URL U2.

Description and Documentation

The new parameter preflight will be introduced to INCLUDE. The HTTP user agent will GET the preflight URL before the HTTP user agent GET the URL to be included. This way, the user agent gets ready for the task of inclusion.

For this to be useful, most likely, {LWPUserAgent}{Params}{cookie_jar} needs to be true.

This implies that TWiki::Net::_requestUsingLWP() will be enhanced. _requestUsingLWP() is indirectly called from both TWiki::Net::getExternalResource() and TWiki::Net::postExternalResource(). A preflight access can be crucial for a POST access. There are cases where a GET request is authenticated in the course of redirects. To POST to the same server, you need to send a GET request before it because a POST request is not subject to redirects.

As such, this is not only about the INCLUDE tag, but also to make TWiki::Net::getExternaResource() and TWiki::Net::postExternaResource() preflight capable. By which plugins using TWiki::Func::getExternalResource() and/or TWiki::Func::postExternalResource() can be made preflight capable.

There can be a situation where you don't want to allow preflight access. {HTTP}{EnablePreflight} boolean configuration parameter (set $TRUE in TWiki.spec) will control the availability.

Examples

%INCLUDE{"https://example.com/retrieve?abc=123&def=456" preflight="https:/example.com"}%

Impact

Implementation

-- Contributors: Hideyo Imazu - 2020-05-25

Discussion

Sounds good. Small typo on reflight vs preflight parameter.

-- Peter Thoeny - 2020-05-25

Thank you for pointing it out. And I elaborated more.

-- Hideyo Imazu - 2020-05-26

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2020-06-02 - HideyoImazu
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.