Github user mosermw commented on a diff in the pull request:
https://github.com/apache/nifi/pull/479#discussion_r66706057
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java
---
@@ -197,6 +198,30 @@
.addValidator(StandardValidators.PORT_VALIDATOR)
.build();
+ public static final String DEFAULT_COOKIE_POLICY_STR = "default";
+ public static final String STANDARD_COOKIE_POLICY_STR = "standard";
+ public static final String STRICT_COOKIE_POLICY_STR = "strict";
+ public static final String NETSCAPE_COOKIE_POLICY_STR = "netscape";
+ public static final String IGNORE_COOKIE_POLICY_STR = "ignore";
+ public static final AllowableValue DEFAULT_COOKIE_POLICY = new
AllowableValue(DEFAULT_COOKIE_POLICY_STR, DEFAULT_COOKIE_POLICY_STR,
+ "Default cookie policy that provides a higher degree of
compatibility with common cookie management of popular HTTP agents for
non-standard (Netscape style) cookies.");
+ public static final AllowableValue STANDARD_COOKIE_POLICY = new
AllowableValue(STANDARD_COOKIE_POLICY_STR, STANDARD_COOKIE_POLICY_STR,
+ "RFC 6265 compliant cookie policy (interoperability
profile).");
+ public static final AllowableValue STRICT_COOKIE_POLICY = new
AllowableValue(STRICT_COOKIE_POLICY_STR, STRICT_COOKIE_POLICY_STR,
+ "RFC 6265 compliant cookie policy (strict profile).");
+ public static final AllowableValue NETSCAPE_COOKIE_POLICY = new
AllowableValue(NETSCAPE_COOKIE_POLICY_STR, NETSCAPE_COOKIE_POLICY_STR,
+ "Netscape draft compliant cookie policy.");
+ public static final AllowableValue IGNORE_COOKIE_POLICY = new
AllowableValue(IGNORE_COOKIE_POLICY_STR, IGNORE_COOKIE_POLICY_STR,
+ "A cookie policy that ignores cookies.");
+
+ public static final PropertyDescriptor REDIRECT_COOKIE_POLICY = new
PropertyDescriptor.Builder()
+ .name("redirect-cookie-policy")
+ .displayName("Redirect Cookie Policy")
+ .description("When a HTTP server responds to a request with a
redirect, this is the cookie policy used to copy cookies to the following
request.")
+ .allowableValues(DEFAULT_COOKIE_POLICY,
STANDARD_COOKIE_POLICY, STRICT_COOKIE_POLICY, NETSCAPE_COOKIE_POLICY,
IGNORE_COOKIE_POLICY)
+ .defaultValue(DEFAULT_COOKIE_POLICY_STR)
--- End diff --
@trkurc thanks for reviewing. Before version 0.6.0 we didn't specify a
cookie spec, so it was DEFAULT. I made a change in 0.6.0 to use
CookieSpecs.STANDARD, thinking this just increased compatibility with more web
sites. When I found that was not true, I suggested via this PR that we make
the CookieSpecs configurable in the processor. So using
.defaultValue(DEFAULT_COOKIE_POLICY_STR) here takes us back to the default
value pre 0.6.0.
I was hoping that it's rare that a cookie policy matters at all to GetHTTP,
so taking us back to pre 0.6.0 functionality, by default, would be OK if not
the desired functionality.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---