       headers.length = 0;
       parseHeaders = true;
       parseSubheaders = true;
+
+      var authHeader:String =
+                    auth.authorizationHeader(method, authState, authOpts, urlParsed, digestNC++);
+
       socket.writeUTFBytes("GET " + urlParsed.urlpath + " HTTP/1.0\r\n");
       socket.writeUTFBytes("Host: " + urlParsed.host + ':' + urlParsed.port + "\r\n");
+      socket.writeUTFBytes(authHeader);
       socket.writeUTFBytes("Accept: multipart/x-mixed-replace\r\n");
       socket.writeUTFBytes("User-Agent: Locomote\r\n");
       socket.writeUTFBytes("\r\n");

    private function onHttpHeaders(event:ProgressEvent):void {
      var parsed:* = request.readHeaders(socket, dataBuffer);
      if (false === parsed) {
        return;
      }


  import com.axis.Logger;
  import com.axis.ErrorManager;
  import com.axis.http.request;
  import com.axis.http.auth;

  [Event(name="image",type="flash.events.Event")]
  [Event(name="connect",type="flash.events.Event")]
