diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java index 85d7433ec9..98b5fdd5ec 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java @@ -397,6 +397,7 @@ public class HandleHttpRequest extends AbstractProcessor { if ( server != null ) { getLogger().debug("Shutting down server"); server.stop(); + server.destroy(); server.join(); getLogger().info("Shut down {}", new Object[] {server}); } diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html new file mode 100644 index 0000000000..d3da666686 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html @@ -0,0 +1,255 @@ + + + +
+ ++ This processor starts an HTTP server and creates a FlowFile for each HTTP Request that it receives. The Processor leaves + the HTTP Connection open and is intended to be used in conjunction with a + HandleHttpResponse Processor. +
+ ++ The pairing of this Processor with a HandleHttpResponse Processor + provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available + through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a + flow such as: +
+ ++ HandleHttpRequest -> + PutSFTP -> + HandleHttpResponse +
+ ++ The HandleHttpRequest Processor provides several Properties to configure which methods are supported, the paths that are + supported, and SSL configuration. The FlowFiles that are generated by this Processor have the following attributes added to + them, providing powerful routing capabilities and traceability of all data: +
+ +Attribute Name | +Attribute Description | + + +
---|---|
http.context.identifier | +An identifier that allows the HandleHttpRequest and HandleHttpResponse to coordinate which FlowFile belongs + to which HTTP Request/Response. | +
mime.type | +The MIME Type of the data, according to the HTTP Header "Content-Type" | +
http.servlet.path | +The part of the request URL that is considered the Servlet Path | +
http.context.path | +The part of the request URL that is considered to be the Context Path | +
http.method | +The HTTP Method that was used for the request, such as GET or POST | +
http.query.string | +The query string portion of hte Request URL | +
http.remote.host | +The hostname of the requestor | +
http.remote.addr | +The hostname:port combination of the requestor | +
http.remote.user | +The username of the requestor | +
http.request.uri | +The full Request URL | +
http.auth.type | +The type of HTTP Authorization used | +
http.principal.name | +The name of the authenticated user making the request | +
http.subject.dn | +The Distinguished Name of the requestor. This value will not be populated unless the Processor is + configured to use an SSLContext Service | +
http.issuer.dn | +The Distinguished Name of the entity that issued the Subject's certificate. This value will not be + populated unless the Processor is configured to use an SSLContext Service | +
http.headers.XXX | +Each of the HTTP Headers that is received in the request will be added as an attribute, prefixed + with "http.headers." For example, if the request contains an HTTP Header named "x-my-header", + then the value will be added to an attribute named "http.headers.x-my-header" | +
+ Properties: +
++ In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi Expression Language (or simply, "expression language"), that is also indicated. +
++ Relationships: +
+
+ See Also:
+ HandleHttpResponse
+ StandardHttpContextMap
+ StandardSSLContextService
+
+ This processor responds to an HTTP request that was received by the + HandleHttpRequest Processor. +
+ ++ The pairing of this Processor with a HandleHttpRequest Processor + provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available + through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a + flow such as: +
+ ++ HandleHttpRequest -> + PutSFTP -> + HandleHttpResponse +
+ ++ This Processor must be configured with the same <HTTP Context Map> service as the corresponding HandleHttpRequest Processor. + Otherwise, all FlowFiles will be routed to the 'failure' relationship. +
+ +
+ All FlowFiles must have an attribute named http.context.identifier
. The value of this attribute is used to lookup
+ the HTTP Response so that the proper message can be sent back to the requestor. If this attribute is missing, the FlowFile
+ will be routed to 'failure.'
+
+ Properties: +
++ In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi Expression Language (or simply, "expression language"), that is also indicated. +
++ Relationships: +
+http.context.identifier
attributehttp.context.identifier
attribute has a value that cannot be found in the HTTP Context Map
+ See Also:
+ HandleHttpRequest
+ StandardHttpContextMap
+ StandardSSLContextService
+