@Override
    public void handle(final HttpServletRequest request, final HttpServletResponse response) {
        securityContext.asProcessingUser(() -> {
            final Instant receivedTime = Instant.now();
            final AttributeMapFilter attributeMapFilter = attributeMapFilterFactory.create();
            final UniqueId receiptId = receiptIdGenerator.generateId();
            final AttributeMap attributeMap = AttributeMapUtil.create(
                    request,
                    certificateExtractor,
                    receivedTime,
                    receiptId);

            // Authenticate the request depending on the configured auth methods.
            // Adds sender details to the attributeMap
            final UserIdentity userIdentity = requestAuthenticator.authenticate(request, attributeMap);

            final String feedName;
            if (attributeMapFilter.filter(attributeMap)) {
                debug("Receiving data", attributeMap);

                feedName = NullSafe.trim(attributeMap.get(StandardHeaderArguments.FEED));

                // Get the type name from the header arguments if supplied.
                String typeName = NullSafe.trim(attributeMap.get(StandardHeaderArguments.TYPE));

                taskContextFactory.context("Receiving Data", taskContext -> {
                    final Consumer<Long> progressHandler =
                            new TaskProgressHandler(taskContext, "Receiving " + feedName + " - ");
                    try (final InputStream inputStream = request.getInputStream()) {
                        streamTargetStreamHandlerProvider.handle(feedName, typeName, attributeMap, handler -> {
                            final StroomStreamProcessor stroomStreamProcessor = new StroomStreamProcessor(
                                    attributeMap,
                                    handler,
                                    progressHandler);
                            stroomStreamProcessor.processInputStream(inputStream, "", receivedTime);
                        });
                    } catch (final RuntimeException | IOException e) {
                        LOGGER.debug(e.getMessage(), e);
                        throw StroomStreamException.create(e, attributeMap);
                    }
                }).run();
            } else {
                // Drop the data.
                debug("Dropping data", attributeMap);
            }

            // Set the response status.
            final StroomStatusCode stroomStatusCode = StroomStatusCode.OK;
            response.setStatus(stroomStatusCode.getHttpCode());

            // TODO Should we put receiptId in content or a resp header?
            LOGGER.debug(() -> "Writing receipt id attribute to response: " + receiptId);
//            response.setHeader(StandardHeaderArguments.RECEIPT_ID, receiptId);
            try (final PrintWriter writer = response.getWriter()) {
                if (writer != null) {
                    writer.println(receiptId);
                }
            } catch (final IOException e) {
                LOGGER.error(e.getMessage(), e);
            }

            logSuccess(new StroomStreamStatus(stroomStatusCode, attributeMap));
        });
    }
<p>
Handle the incoming requests and stream them to disk checking a few things.
</p>
stroom-core/src/main/java/stroom/core/receive/ReceiveDataRequestHandler.java