buffer writes before onopen instead of DOM Exception 11
also buffer end()
patch to make .end(data) work
fix conflict