| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // an http response is received. In these cases, the http server may have | 76 // an http response is received. In these cases, the http server may have |
| 77 // timed out the keepalive connection before it received our request. Note | 77 // timed out the keepalive connection before it received our request. Note |
| 78 // that if a request document cannot be rewound, no retry is made. The | 78 // that if a request document cannot be rewound, no retry is made. The |
| 79 // default is 1. | 79 // default is 1. |
| 80 void set_request_retries(size_t retries) { retries_ = retries; } | 80 void set_request_retries(size_t retries) { retries_ = retries; } |
| 81 size_t request_retries() const { return retries_; } | 81 size_t request_retries() const { return retries_; } |
| 82 | 82 |
| 83 enum RedirectAction { REDIRECT_DEFAULT, REDIRECT_ALWAYS, REDIRECT_NEVER }; | 83 enum RedirectAction { REDIRECT_DEFAULT, REDIRECT_ALWAYS, REDIRECT_NEVER }; |
| 84 void set_redirect_action(RedirectAction action) { redirect_action_ = action; } | 84 void set_redirect_action(RedirectAction action) { redirect_action_ = action; } |
| 85 RedirectAction redirect_action() const { return redirect_action_; } | 85 RedirectAction redirect_action() const { return redirect_action_; } |
| 86 // Deprecated | |
| 87 void set_fail_redirect(bool fail_redirect) { | |
| 88 redirect_action_ = REDIRECT_NEVER; | |
| 89 } | |
| 90 bool fail_redirect() const { return (REDIRECT_NEVER == redirect_action_); } | |
| 91 | 86 |
| 92 enum UriForm { URI_DEFAULT, URI_ABSOLUTE, URI_RELATIVE }; | 87 enum UriForm { URI_DEFAULT, URI_ABSOLUTE, URI_RELATIVE }; |
| 93 void set_uri_form(UriForm form) { uri_form_ = form; } | 88 void set_uri_form(UriForm form) { uri_form_ = form; } |
| 94 UriForm uri_form() const { return uri_form_; } | 89 UriForm uri_form() const { return uri_form_; } |
| 95 | 90 |
| 96 void set_cache(DiskCache* cache) { ASSERT(!IsCacheActive()); cache_ = cache; } | 91 void set_cache(DiskCache* cache) { ASSERT(!IsCacheActive()); cache_ = cache; } |
| 97 bool cache_enabled() const { return (NULL != cache_); } | 92 bool cache_enabled() const { return (NULL != cache_); } |
| 98 | 93 |
| 99 // reset clears the server, request, and response structures. It will also | 94 // reset clears the server, request, and response structures. It will also |
| 100 // abort an active request. | 95 // abort an active request. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 public: | 186 public: |
| 192 HttpClientDefault(SocketFactory* factory, const std::string& agent, | 187 HttpClientDefault(SocketFactory* factory, const std::string& agent, |
| 193 HttpTransaction* transaction = NULL); | 188 HttpTransaction* transaction = NULL); |
| 194 }; | 189 }; |
| 195 | 190 |
| 196 ////////////////////////////////////////////////////////////////////// | 191 ////////////////////////////////////////////////////////////////////// |
| 197 | 192 |
| 198 } // namespace rtc | 193 } // namespace rtc |
| 199 | 194 |
| 200 #endif // WEBRTC_BASE_HTTPCLIENT_H__ | 195 #endif // WEBRTC_BASE_HTTPCLIENT_H__ |
| OLD | NEW |