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

ASF GitHub Bot commented on NIFI-5258:
--------------------------------------

Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2759#discussion_r192902457
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
 ---
    @@ -516,30 +518,37 @@ private WebAppContext loadWar(final File warFile, 
final String contextPath, fina
     
         private ContextHandler createDocsWebApp(final String contextPath) {
             try {
    -            final ResourceHandler resourceHandler = new ResourceHandler();
    -            resourceHandler.setDirectoriesListed(false);
    -
                 final File docsDir = getDocsDir("docs");
                 final Resource docsResource = Resource.newResource(docsDir);
     
    -            // load the component documentation working directory
    +            // Load the component documentation working directory
                 final File componentDocsDirPath = 
props.getComponentDocumentationWorkingDirectory();
                 final File workingDocsDirectory = 
getWorkingDocsDirectory(componentDocsDirPath);
                 final Resource workingDocsResource = 
Resource.newResource(workingDocsDirectory);
     
                 final File webApiDocsDir = getWebApiDocsDir();
                 final Resource webApiDocsResource = 
Resource.newResource(webApiDocsDir);
     
    -            // create resources for both docs locations
    +            // Create resources for all docs locations
                 final ResourceCollection resources = new 
ResourceCollection(docsResource, workingDocsResource, webApiDocsResource);
    -            resourceHandler.setBaseResource(resources);
     
    -            // create the context handler
    -            final ContextHandler handler = new ContextHandler(contextPath);
    -            handler.setHandler(resourceHandler);
    +
    +            // The below ServletContext and Servlet API usage was derived 
from https://stackoverflow.com/a/34277268.
    +            // Thanks go to Stack Overflow user Joakim Erdfelt.
    --- End diff --
    
    I think referencing a resource is ok but personal callouts aren't unless 
the code is derived from something under license to them? @joewitt can you 
please advise?


> Improve handling of response headers for consistent application
> ---------------------------------------------------------------
>
>                 Key: NIFI-5258
>                 URL: https://issues.apache.org/jira/browse/NIFI-5258
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.6.0
>            Reporter: Andy LoPresto
>            Assignee: Nathan Gough
>            Priority: Minor
>              Labels: http, response
>
> Some response headers are not set consistently (missing or duplicated) on the 
> different web contexts. Enforce consistent behavior. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to