only network errors are treated by on_error
fixed conn_max mechanism
added unit tests
added more tests
fixed a bug on resolving urls with non absolute base tag