[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-26 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800658#comment-17800658
 ] 

ASF subversion and git services commented on NIFI-12513:


Commit 006d5cc4ddd372aa8c09f75431e9531dbfcaaa5b in nifi's branch 
refs/heads/support/nifi-1.x from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=006d5cc4dd ]

NIFI-12513 Removed unused import from InvokeHTTPTest

Signed-off-by: David Handermann 


> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
> Fix For: 1.25.0, 2.0.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-26 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800645#comment-17800645
 ] 

ASF subversion and git services commented on NIFI-12513:


Commit 2ac98f2a817bf3881510a9df2320d092b01cad89 in nifi's branch 
refs/heads/support/nifi-1.x from dan-s1
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2ac98f2a81 ]

NIFI-12513 Added UriUtils to nifi-utils and updated InvokeHTTP

The UriUtils class allows the construction of a valid java.net.URI with a 
single string even though there maybe illegal characters in the path, query 
and/or fragment sections(s) of the URI. The create method uses regular 
expressions from Spring Framework UriComponentsBuilder and provides 
capabilities closer to the deprecated constructor for java.net.URL.

This closes #8189

Signed-off-by: David Handermann 

(cherry picked from commit 3b8ff2299f80aa27dbfe7d69bf88a1defd0a4ecd)


> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-26 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800644#comment-17800644
 ] 

ASF subversion and git services commented on NIFI-12513:


Commit 3b8ff2299f80aa27dbfe7d69bf88a1defd0a4ecd in nifi's branch 
refs/heads/main from dan-s1
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=3b8ff2299f ]

NIFI-12513 Added UriUtils to nifi-utils and updated InvokeHTTP

The UriUtils class allows the construction of a valid java.net.URI with a 
single string even though there maybe illegal characters in the path, query 
and/or fragment sections(s) of the URI. The create method uses regular 
expressions from Spring Framework UriComponentsBuilder and provides 
capabilities closer to the deprecated constructor for java.net.URL.

This closes #8189

Signed-off-by: David Handermann 


> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799924#comment-17799924
 ] 

David Handermann commented on NIFI-12513:
-

It would be helpful to mention in the JavaDoc that it is derived from Spring 
UriComponentsBuilder, but the main thing is the reference in the NOTICE.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799922#comment-17799922
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory] That is what exactly I have done. Do I have to mention in 
the UrlUtils class where I got the regular expressions or is enough the change 
to the NOTICE file stating that there are derived works from 
https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java
 ?

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799919#comment-17799919
 ] 

David Handermann commented on NIFI-12513:
-

Thanks for working on this [~dstiegli1].

To answer your licensing question, yes, ASLv2 is short for Apache License, 
Version 2.0.

Based on a cursory review, most other places that were changed probably don't 
need the additional parsing, since the URLs would not contain fragment 
sections. A closer review may be necessary to be sure. If you are able to 
implement a reusable UrlUtils class in the {{nifi-utils}} module, that sounds 
like a great solution, and would provide potential support for other changes if 
needed.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799917#comment-17799917
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory] [~pvillard] So I have developed a utility method which now 
uses a regular expression to parse the 7 parts of the URI and instantiates a 
URI object with those seven pieces as I had suggested earlier. I modified the 
StandardValidators#URL_VALIDATOR and InvokeHttp (when creating the java.net.URI 
object from the value entered in the 'HTTP_URL' property)  to now use the 
utility method. My question is where else would this change apply? What other 
places that are currently using URI.create would pose a problem since there be 
unquoted/unescaped characters in its query and/or fragments sections? I am not 
sure all of the places changed in #7771 need this.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799898#comment-17799898
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~joewitt] Just to clarify when the file has 

??Licensed under the Apache License, Version 2.0 (the "License");??

that is the same as ASLv2?

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread Joe Witt (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799865#comment-17799865
 ] 

Joe Witt commented on NIFI-12513:
-

Code that is released under ASLv2 we can quite literally copy as-is in whole or 
part generally.  We do have some such code in our codebase today.  Anything 
considered under a Category-A license in ASF terms is fair game for this.  We 
just need to carry forward any copyright mechanisms and I think we continue the 
good form whereby we list in our notice code we have copied.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799863#comment-17799863
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory] I found the following [Stackoverflow 
Post|https://stackoverflow.com/questions/60324474/how-to-parse-any-url-uri-in-java]
 where the question seems to be the exact problem in the description of this 
ticket (i.e. the part about URI construction failing when there are illegal 
characters).  The suggestion in that post is the use of Spring's 
[UriComponentsBuilder|https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java].
 The questioner responded

??If you are on a non-Spring application the library 
org.springframework:spring-web and it's dependencies are a big bunch of code 
(~3.4MB at the moment for 5.2.3) just for parsing URIs. But the Regex pattern 
URI_PATTERN in the linked code and the fromUriString(String) method seems to be 
of great value. And it is under Apache 2 license??

If its under Apache License can we take advantage of the code in a different 
form as the questioner seemed to imply? He is right the Regex pattern 
URI_PATTERN in the linked code and the fromUriString(String) method seems to be 
of great value. 


> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-22 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799845#comment-17799845
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory]  [~pvillard] 
I am still working out the regular expression. In the meantime there is a 
workaround for at least InvokeHttp. For the 'HTTP URL' property use NIFI 
Expression Language and before the InvokeHttp use UpdateAttribute to set an 
attribute with the value of getUri from the NIFI Expression Language. The value 
with the URL specified in the description would like 

{code:java}
${getUri('https', null, 'en.wikipedia.org', -1, '/w/api.php', 
'action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags',
 null)}
{code}


> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-20 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799245#comment-17799245
 ] 

David Handermann commented on NIFI-12513:
-

Thanks for the reminder and reference [~dstiegli1].

Can you provide an example of what the Regular Expression would like look? 
There is the potential for edge cases, but at least providing an example here 
would help evaluate the potential complexity.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-20 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799239#comment-17799239
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory] As I demonstrated above when broken into its parts the 
constructor with seven arguments does not behave like  URI.create(String). This 
same issue is what I believe we solved in  NIFI-10754 using the NIFI Expression 
Language.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-20 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799237#comment-17799237
 ] 

David Handermann commented on NIFI-12513:
-

According to the documentation for 
[java.net.URI|https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#URI-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-]
 the constructor builds a string and then passes it to the {{URI(String)}} 
constructor, which is the same behavior as calling {{URI.create(String)}}.

{quote}
The resulting URI string is then parsed as if by invoking the URI(String) 
constructor and then invoking the parseServerAuthority() method upon the 
result; this may cause a URISyntaxException to be thrown. 
{quote}

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-20 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799235#comment-17799235
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory] That is what I thought the URI constructor does it encodes 
the path and query.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-20 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799221#comment-17799221
 ] 

David Handermann commented on NIFI-12513:
-

[~dstiegli1] On further review, parsing the component parts and passing them to 
alternative constructors does not look like it would resolve the fundamental 
problem. Are you suggested that some other encoding could be perform on the 
path or query elements after separating them?

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-18 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798372#comment-17798372
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

Looks like a lot of low level parsing found 
[URLStreamHandler#parseURL|https://github.com/openjdk/jdk21/blob/890adb6410dab4606a4f26a942aed02fb2f55387/src/java.base/share/classes/java/net/URLStreamHandler.java#L138]

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-18 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798365#comment-17798365
 ] 

David Handermann commented on NIFI-12513:
-

[~dstiegli1] Although possible, using regular expressions to parse the URL 
could be very prone to error when it comes to path and query components. The 
scheme, host, and port are straightforward, but the challenging portions are 
the path and query, which may or may not need to be encoded.

This probably warrants a closer evaluation of what the java.net.URL constructor 
previously did before it was removed.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-18 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798361#comment-17798361
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~exceptionfactory] Could we use regular expressions to parse the user entered 
URL into the parts necessary to instantiate the java.net.URI instance?

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-18 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798356#comment-17798356
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

FYI I got this to work

 
{code:java}
String scheme = "https";
String userInfo = null;
String host = "en.wikipedia.org";
int port = -1;
String path = "/w/api.php";
String query = 
"action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags";
String fragment = null;
 URI uri = new URI(scheme, userInfo, host, port, path, query, fragment);
{code}
 

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-18 Thread David Handermann (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798349#comment-17798349
 ] 

David Handermann commented on NIFI-12513:
-

One thing to note, it is important to avoid introducing any new external 
dependencies to the {{nifi-utils}} package, which currently contains the 
StandardValidators class. Many components use {{nifi-utils}}, so introducing 
new dependencies would have a large downstream impact. This might be a case 
where the new behavior should be documented without making changes.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-12513) Regression in InvokeHTTP - Not a valid URL

2023-12-18 Thread Daniel Stieglitz (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798343#comment-17798343
 ] 

Daniel Stieglitz commented on NIFI-12513:
-

[~pvillard] It would seem this issue is not specific to InvokeHttp but with the 
StandardValidators.URL_VALIDATOR as the URL you listed fails when called with  
{code:java}
URI.create(evaluatedInput).toURL();{code}
The same logic is called in InvokeHTTP but anything PropertyDescriptor which 
uses the StandardValidators.URL_VALIDATOR will fail to validate.

> Regression in InvokeHTTP - Not a valid URL
> --
>
> Key: NIFI-12513
> URL: https://issues.apache.org/jira/browse/NIFI-12513
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 2.0.0-M1, 1.24.0
>Reporter: Pierre Villard
>Assignee: Daniel Stieglitz
>Priority: Major
>
> On NiFi 1.24 and NiFi 2.0-M1, the below URL
> {code:java}
> https://en.wikipedia.org/w/api.php?action=query=recentchanges=json=user|comment|parsedcomment|timestamp|title|sizes|tags{code}
> Is no longer considered as valid but it was a valid one before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)