File tree Expand file tree Collapse file tree
src/puppetlabs/puppetdb/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change 197197 [prismatic/schema " 1.4.1" ]
198198 [riddley " 0.2.0" ]
199199 [ring/ring-codec " 1.3.0" ]
200- [ring/ring-core " 1.8.2 " ]
200+ [ring/ring-core " 1.15.3 " ]
201201 [ring/ring-mock " 0.6.2" ]
202202 [robert/hooke " 1.3.0" ]
203203 [timofreiberg/bultitude " 0.3.1" ]
Original file line number Diff line number Diff line change 1717 (:import
1818 (clojure.lang ExceptionInfo)
1919 (java.net HttpURLConnection)
20- (org.apache.commons.fileupload.util LimitedInputStream )))
20+ (org.apache.commons.io.input BoundedInputStream )))
2121
2222(def min-supported-commands
2323 {" configure expiration" 1
124124 ; ; The drain is because ruby. i.e. if we closed the connection
125125 ; ; without that, one of the ruby clients wouldn't handle the broken
126126 ; ; pipe in a friendly way.
127- (proxy [LimitedInputStream] [stream max-size]
128- (raiseError [max-size count]
127+ ; ;
128+ ; ; Override onMaxLength which is called when
129+ ; ; the max count is reached during a read operation.
130+ (proxy [BoundedInputStream] [stream max-size]
131+ (onMaxLength [max-count read-count]
129132 ; ; We don't trust skip; it appears to just invoke InputStream
130133 ; ; skip which claims to allocate at least one buffer (of
131134 ; ; unspecified size) per request.
132135 (loop [buf (byte-array (* 64 1024 ))]
133- (when (pos? (.read ^java.io.InputStream this buf))
136+ (when (pos? (.read ^java.io.InputStream stream buf))
134137 (recur buf)))
135138 (throw (ex-info " " {:kind ::body-stream-overflow })))))
136139
You can’t perform that action at this time.
0 commit comments