Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Josh for Get size of Wordpress RSS feed?

I ran into a similar issue with a project last year. Turns out the server wasn't returning the correct header for Flash to pick up on. I can't remember which header it needs to populate bytesTotal, unfortunately, but I did come up with a quick work around.

this.urlLoader.addEventListenever( HTTPStatusEvent.HTTP_RESPONSE_STATUS, this.statusResponse );private function statusResponse(e:HTTPStatusEvent = null):void{    for ( var i:Number = 0; i < e.responseHeaders.length; i++ ) {        var current:Object = e.responseHeaders[i];        if ( current.name.toLowerCase() == "content-length" ) {            this.bytesTotal = current.value;            break;        }    }}

This worked for me, although it obviously relies on the server sending a Content-Length header.


Viewing all articles
Browse latest Browse all 2

Trending Articles