anchor.diff:          return;
         }
   
  -      if (data is FcgiRecord)
  -        socket.add(data.toByteStream());
  +      if (data is FcgiRecord) {
  +        int requestId = data.header.requestId;
  +        if (requestId != FCGI_NULL_REQUEST_ID) {
  +          socketAdd(socket, new FcgiRecord.generateResponse(requestId,
  +              new FcgiStreamBody.empty(FcgiRecordType.STDOUT)));
  +          socketAdd(socket, new FcgiRecord.generateResponse(requestId,
  +              new FcgiStreamBody.empty(FcgiRecordType.STDERR)));
  +        }
  +        socketAdd(socket, data);
  +      }
       });
     }
   }
   
   socketAdd(Socket socket, FcgiRecord record) {
  -  _libLogger.info(record.header.type);
  +  _libLogger.info("<- $record");
   
     socket.add(record.toByteStream());
  -
  -  if (record.header.type == FcgiRecordType.END_REQUEST) {
  -    counter = 0;
  -  }
   }
positive.code:         .transform(new FcgiRecordTransformer())
          .listen((FcgiRecord record) {
        //TODO: implement record handling
        _libLogger.info(record.header.type.toString());
  
        FcgiRecord response;
  
        //only for testing
        counter++;
        if (counter < 4) return;
  
        //IMPORTANT: SEND CONTENT TYPE OF RETURN FIRST!!!
        response = new FcgiRecord.generateResponse(record.header.requestId,
            new FcgiStreamBody(FcgiRecordType.STDOUT, new AsciiCodec().encode("Content-type: text/html\r\n\r\n")));
  
        socketAdd(socket, response);
  
        response = new FcgiRecord.generateResponse(record.header.requestId,
            new FcgiStreamBody.fromString(FcgiRecordType.STDOUT, "Hello World!"));
  
        socketAdd(socket, response);
  
        response = new FcgiRecord.generateResponse(record.header.requestId,
            new FcgiStreamBody.fromString(FcgiRecordType.STDOUT,
                '''
                  <!DOCTYPE html>
  <html>
  <body>
  
  <h1>My First Heading</h1>
  
  <p>My first paragraph.</p>
  
  </body>
  </html>
  
  
                  '''
            ));
  
        socketAdd(socket, response);
  
        response = new FcgiRecord.generateResponse(record.header.requestId,
            new FcgiEndRequestBody(1, FcgiProtocolStatus.REQUEST_COMPLETE));
  
        socketAdd(socket, response);
  
      }, onError: (data) {
        //TODO: check if stream is already closed (SocketException)
  
negative.code: 
  Logger _libLogger = new Logger("dart_fpm");
  
  main() async {
    hierarchicalLoggingEnabled = true;
    Logger.root.level = Level.ALL;
  