ASIUnableToCreateRequestError=[[NSErrorerrorWithDomain:NetworkRequestErrorDomaincode:ASIUnableToCreateRequestErrorTypeuserInfo:[NSDictionarydictionaryWithObjectsAndKeys:@"Unable to create request (bad url?)",NSLocalizedDescriptionKey,nil]]retain];
ASITooMuchRedirectionError=[[NSErrorerrorWithDomain:NetworkRequestErrorDomaincode:ASITooMuchRedirectionErrorTypeuserInfo:[NSDictionarydictionaryWithObjectsAndKeys:@"The request failed because it redirected too many times",NSLocalizedDescriptionKey,nil]]retain];
// IDs that will be used for the four streams we'll create (see
// Based on http://lists.apple.com/archives/macnetworkprog/2008/Dec/msg00001.html
// Basically, we aim to open a maximum of 4 connections (each one with a different id), and then subsequent requests will try to re-use the same stream, assuming we're connecting to the same server
// I'm guessing this will perform less well when you're connecting to several different servers at once
// But if you aren't, this appears to be the magic bullet for matching NSURLConnection's performance
// We will re-use the previous ID for a synchronous request, since that probably gives us a greater chance of maximimising connection re-use