natural commented on issue #4125: NIFI-7153 Adds ContentLengthFilter and 
DoSFilter
URL: https://github.com/apache/nifi/pull/4125#issuecomment-603408254
 
 
   > @natural if you can show me what I am doing wrong or resolve the issue 
with the log output, I will make the minor formatting changes I pointed out and 
merge this.
   
   I believe you tripped the internal form-length filter because `curl` is 
sending a multipart form. 
   
   When I PUT json directly:
   
   ```$ openssl rand -hex 30240000 > /tmp/hexdata
   $ http -p Hh PUT 
:8080/nifi-api/processors/0da1088c-0171-1000-da90-5ddb7f242ee1 foo=@/tmp/hexdata
   PUT /nifi-api/processors/0da1088c-0171-1000-da90-5ddb7f242ee1 HTTP/1.1
   Accept: application/json, */*
   Accept-Encoding: gzip, deflate
   Connection: keep-alive
   Content-Length: 60480013
   Content-Type: application/json
   Host: localhost:8080
   User-Agent: HTTPie/1.0.2
   
   HTTP/1.1 413 Payload Too Large
   Content-Length: 17
   Content-Security-Policy: frame-ancestors 'self'
   Content-Type: text/plain
   Date: Tue, 24 Mar 2020 17:51:08 GMT
   Server: Jetty(9.4.19.v20190610)
   X-Frame-Options: SAMEORIGIN
   X-XSS-Protection: 1; mode=block
   
   ```
   
   I have the log entries as expected:
   
   
   `2020-03-24 09:51:08,932 WARN [NiFi Web Server-18] 
o.a.n.w.s.requests.ContentLengthFilter Content length check rejected request 
with content-length 60480013 greater than maximum 20971520 B`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to