I was trying to use MBProgressHUD with NSURLConnection.
The example in Demo project of MBProgressHUD reports:
- (IBAction)showURL:(id)sender {
NS
You should check the value of [response expectedContentLength]
in didReceiveResponse
.
A http server can omit the "Content-Length" header and use "Transfer-Encoding: chunked" instead. In that case the content length is not known a priori and [response expectedContentLength]
returns NSURLResponseUnknownLength
(which is -1
)`.
I could imagine that setting HUD.progress
to a negative value causes the CGPathAddArc
console messages.
According to the documentation, it can also happen that the accumulated currentLength
becomes larger than the expected response length, so you should check for that also.