BHttpRequest::BHttpRequest(const BUrl& url, bool ssl, const char* protocolName, BUrlProtocolListener* listener, BUrlContext* context) : BNetworkRequest(url, listener, context, "BUrlProtocol.HTTP", protocolName), fSSL(ssl), fRequestMethod(B_HTTP_GET), fHttpVersion(B_HTTP_11), fResult(url), fRequestStatus(kRequestInitialState), fOptHeaders(NULL), fOptPostFields(NULL), fOptInputData(NULL), fOptInputDataSize(-1), fOptRangeStart(-1), fOptRangeEnd(-1), fOptFollowLocation(true) { _ResetOptions(); fSocket = NULL; }
BHttpRequest::BHttpRequest(const BHttpRequest& other) : BNetworkRequest(other.Url(), other.fListener, other.fContext, "BUrlProtocol.HTTP", other.fSSL ? "HTTPS" : "HTTP"), fSSL(other.fSSL), fRequestMethod(other.fRequestMethod), fHttpVersion(other.fHttpVersion), fResult(other.fUrl), fRequestStatus(kRequestInitialState), fOptHeaders(NULL), fOptPostFields(NULL), fOptInputData(NULL), fOptInputDataSize(-1), fOptRangeStart(other.fOptRangeStart), fOptRangeEnd(other.fOptRangeEnd), fOptFollowLocation(other.fOptFollowLocation) { _ResetOptions(); // FIXME some options may be copied from other instead. fSocket = NULL; }
BHttpRequest::BHttpRequest(const BUrl& url, bool ssl, const char* protocolName, BUrlProtocolListener* listener, BUrlContext* context) : BUrlRequest(url, listener, context, "BUrlProtocol.HTTP", protocolName), fSocket(NULL), fSSL(ssl), fRequestMethod(B_HTTP_GET), fHttpVersion(B_HTTP_11), fResult(url), fRequestStatus(kRequestInitialState), fOptHeaders(NULL), fOptPostFields(NULL), fOptInputData(NULL), fOptInputDataSize(-1), fOptFollowLocation(true) { _ResetOptions(); if (ssl) fSocket = new(std::nothrow) BSecureSocket(); else fSocket = new(std::nothrow) BSocket(); }