| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "platform/loader/fetch/ResourceRequest.h" | 27 #include "platform/loader/fetch/ResourceRequest.h" |
| 28 | 28 |
| 29 #include <memory> | 29 #include <memory> |
| 30 #include "platform/HTTPNames.h" | 30 #include "platform/HTTPNames.h" |
| 31 #include "platform/RuntimeEnabledFeatures.h" | 31 #include "platform/RuntimeEnabledFeatures.h" |
| 32 #include "platform/network/NetworkUtils.h" | 32 #include "platform/network/NetworkUtils.h" |
| 33 #include "platform/weborigin/SecurityOrigin.h" | 33 #include "platform/weborigin/SecurityOrigin.h" |
| 34 #include "platform/wtf/PtrUtil.h" |
| 34 #include "public/platform/WebAddressSpace.h" | 35 #include "public/platform/WebAddressSpace.h" |
| 35 #include "public/platform/WebCachePolicy.h" | 36 #include "public/platform/WebCachePolicy.h" |
| 36 #include "public/platform/WebURLRequest.h" | 37 #include "public/platform/WebURLRequest.h" |
| 37 #include "wtf/PtrUtil.h" | |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 double ResourceRequest::s_defaultTimeoutInterval = INT_MAX; | 41 double ResourceRequest::s_defaultTimeoutInterval = INT_MAX; |
| 42 | 42 |
| 43 ResourceRequest::ResourceRequest() : ResourceRequest(KURL()) {} | 43 ResourceRequest::ResourceRequest() : ResourceRequest(KURL()) {} |
| 44 | 44 |
| 45 ResourceRequest::ResourceRequest(const String& urlString) | 45 ResourceRequest::ResourceRequest(const String& urlString) |
| 46 : ResourceRequest(KURL(ParsedURLString, urlString)) {} | 46 : ResourceRequest(KURL(ParsedURLString, urlString)) {} |
| 47 | 47 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // layer. | 417 // layer. |
| 418 if (httpMethod() == HTTPNames::GET || httpMethod() == HTTPNames::HEAD) | 418 if (httpMethod() == HTTPNames::GET || httpMethod() == HTTPNames::HEAD) |
| 419 return false; | 419 return false; |
| 420 | 420 |
| 421 // For non-GET and non-HEAD methods, always send an Origin header so the | 421 // For non-GET and non-HEAD methods, always send an Origin header so the |
| 422 // server knows we support this feature. | 422 // server knows we support this feature. |
| 423 return true; | 423 return true; |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace blink | 426 } // namespace blink |
| OLD | NEW |