You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by vs186031 <gi...@git.apache.org> on 2015/10/16 21:18:29 UTC

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

GitHub user vs186031 opened a pull request:

    https://github.com/apache/nifi/pull/104

    NiFI-747: ListenHTTP exposes property for the URL path to accept data on

    NiFI-747 : ListenHTTP exposes a URL path with a default value of /contentListener (to preserve backwards compatibility) . A user can now change the path to something convenient to them.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vs186031/nifi nifi-747

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/104.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #104
    
----
commit 177359769689b8d6b1a568635cb2fa366a1117fd
Author: Venkatesh Sellappa <vs...@outlook.com>
Date:   2015-10-16T19:12:51Z

    NiFI-747: ListenHTTP exposes property for the URL path to accept data on

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by trkurc <gi...@git.apache.org>.
Github user trkurc commented on the pull request:

    https://github.com/apache/nifi/pull/104#issuecomment-148871554
  
    One issue. The property will validate, but the processor will not run. I set the URI to 'content5000', but this causes errors like these
    ```
    2015-10-16 20:37:08,755 ERROR [pool-28-thread-2] o.a.n.c.s.StandardProcessScheduler Failed to invoke @OnScheduled method due to java.lang.IllegalArgumentException: PathSpec contentListener5000/holds/*. must start with '/' or '*.'
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by trkurc <gi...@git.apache.org>.
Github user trkurc commented on the pull request:

    https://github.com/apache/nifi/pull/104#issuecomment-148874072
  
    Aside from the property validation, it works as expected. I confirmed POSTs and DELETEs on HOLDs work (using Poster)
     
    Just a quick style question, did you give any thought to not removing the annotation below and maybe instead changing it to 'Path("*")'?
    '''
    -@Path(ListenHTTP.URI)
    '''
    
    The reason I ask, I was trying to reason through the loop below, and thought your change may be an opportunity to remove the 'path == null' condition
    '''
       for (final Class<? extends Servlet> cls : getServerClasses()) {
                final Path path = cls.getAnnotation(Path.class);
                if (path == null) {
                    contextHandler.addServlet(cls, uri + "/*");
                } else {
                    contextHandler.addServlet(cls, uri + "/" + path.value());
                }
            }
    ...
    '''


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by trkurc <gi...@git.apache.org>.
Github user trkurc commented on the pull request:

    https://github.com/apache/nifi/pull/104#issuecomment-149066148
  
    @vs186031  - I merged in your changes with some edits - please take a look at the final squashed commit (https://github.com/apache/nifi/commit/88b1b844fba5e4dded6242bb17f2096ff4172ed3). As @joewitt  mentioned on Jira, this ticket probably was mislabeled as a newbie ticket. Nice work!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by Venkatesh Sellappa <vs...@outlook.com>.
Of course , the fancy curl or wget.



--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/GitHub-nifi-pull-request-NiFI-747-ListenHTTP-exposes-property-for-the-U-tp3126p3134.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by trkurc <gi...@git.apache.org>.
Github user trkurc commented on the pull request:

    https://github.com/apache/nifi/pull/104#issuecomment-148907545
  
    >  What exactly is Poster ?
    Ah, sorry, it is a firefox browser extension I like to use that makes it easy to do do arbitrary HTTP requests.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by vs186031 <gi...@git.apache.org>.
Github user vs186031 commented on the pull request:

    https://github.com/apache/nifi/pull/104#issuecomment-148893113
  
    "I set the URI to 'content5000', but this causes errors like these..." 
    
    - That's a good catch , i suspect this is due to the standard URI validator 
    
    "Just a quick style question, did you give any thought to not removing the annotation below and maybe instead changing it to 'Path("*")'?"
    
    - I did and then backed off to keep the first commit change minimal, however i agree this is a good opportunity to change the (if path==null) condition. 
    
    One question : "I confirmed POSTs and DELETEs on HOLDs work (using Poster)" 
    
    - What exactly is Poster ? 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/104


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request: NiFI-747: ListenHTTP exposes property for the U...

Posted by vs186031 <gi...@git.apache.org>.
Github user vs186031 commented on the pull request:

    https://github.com/apache/nifi/pull/104#issuecomment-148951828
  
    >Aside from the property validation, it works as expected. I confirmed POSTs and DELETEs on HOLDs work (using Poster)
    
    Added a small Regex to ensure that the Property Validation works.
    
    >Just a quick style question, did you give any thought to not removing the annotation below and maybe instead changing it to 'Path("*")'?
    
    Made this change as well.
    
    I did the changes as two separate change-sets, just in case.
    
    >Ah, sorry, it is a firefox browser extension I like to use that makes it easy to do do arbitrary HTTP requests.
    
    This is actually quite cool , thanks for that.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---