@@ -35,17 +35,19 @@ { OFURL *URL; of_http_request_type_t requestType; OFString *queryString; OFDictionary *headers; + BOOL redirectsFromHTTPSToHTTPAllowed; } #ifdef OF_HAVE_PROPERTIES @property (copy) OFURL *URL; @property (assign) of_http_request_type_t requestType; @property (copy) OFString *queryString; @property (copy) OFDictionary *headers; +@property (assign) BOOL redirectsFromHTTPSToHTTPAllowed; #endif /** * \return A new, autoreleased OFHTTPRequest */ @@ -111,10 +113,22 @@ /** * \return A dictionary with headers for the HTTP request. */ - (OFDictionary*)headers; +/** + * Sets whether redirects from HTTPS to HTTP are allowed. + * + * \param allowed Whether redirects from HTTPS to HTTP are allowed + */ +- (void)setRedirectsFromHTTPSToHTTPAllowed: (BOOL)allowed; + +/** + * \return Whether redirects from HTTPS to HTTP are allowed + */ +- (BOOL)redirectsFromHTTPSToHTTPAllowed; + /** * Performs the HTTP request and returns an OFHTTPRequestResult. * * \return An OFHTTPRequestResult with the result of the HTTP request */