Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 , containsNoStore(false) | 85 , containsNoStore(false) |
| 86 , containsMustRevalidate(false) | 86 , containsMustRevalidate(false) |
| 87 , maxAge(0.0) | 87 , maxAge(0.0) |
| 88 , staleWhileRevalidate(0.0) | 88 , staleWhileRevalidate(0.0) |
| 89 { | 89 { |
| 90 } | 90 } |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&); | 93 PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&); |
| 94 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&); | 94 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&); |
| 95 PLATFORM_EXPORT bool isValidHTTPHeaderValueForFetch(const String&); | |
|
hiroshige
2015/08/27 11:38:08
How about isValidHTTPFieldContentRFC7230()?
(This
shiva.jm
2015/09/01 08:26:51
Done.
| |
| 95 PLATFORM_EXPORT bool isValidHTTPToken(const String&); | 96 PLATFORM_EXPORT bool isValidHTTPToken(const String&); |
| 96 PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivM eta, double& delay, String& url); | 97 PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivM eta, double& delay, String& url); |
| 97 PLATFORM_EXPORT double parseDate(const String&); | 98 PLATFORM_EXPORT double parseDate(const String&); |
| 98 PLATFORM_EXPORT String filenameFromHTTPContentDisposition(const String&); | 99 PLATFORM_EXPORT String filenameFromHTTPContentDisposition(const String&); |
| 99 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&); | 100 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&); |
| 100 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); | 101 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); |
| 101 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0); | 102 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0); |
| 102 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL); | 103 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL); |
| 103 PLATFORM_EXPORT String extractReasonPhraseFromHTTPStatusLine(const String&); | 104 PLATFORM_EXPORT String extractReasonPhraseFromHTTPStatusLine(const String&); |
| 104 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ; | 105 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ; |
| 105 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin g& cacheControlHeader, const AtomicString& pragmaHeader); | 106 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin g& cacheControlHeader, const AtomicString& pragmaHeader); |
| 106 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD elimitedHeaderSet&); | 107 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD elimitedHeaderSet&); |
| 107 | 108 |
| 108 // -1 could be set to one of the return parameters to indicate the value is not specified. | 109 // -1 could be set to one of the return parameters to indicate the value is not specified. |
| 109 PLATFORM_EXPORT bool parseRange(const String&, long long& rangeOffset, long long & rangeEnd, long long& rangeSuffixLength); | 110 PLATFORM_EXPORT bool parseRange(const String&, long long& rangeOffset, long long & rangeEnd, long long& rangeSuffixLength); |
| 110 | 111 |
| 111 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header); | 112 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header); |
| 112 | 113 |
| 113 // Parsing Complete HTTP Messages. | 114 // Parsing Complete HTTP Messages. |
| 114 enum HTTPVersion { Unknown, HTTP_1_0, HTTP_1_1 }; | 115 enum HTTPVersion { Unknown, HTTP_1_0, HTTP_1_1 }; |
| 115 PLATFORM_EXPORT size_t parseHTTPRequestLine(const char* data, size_t length, Str ing& failureReason, String& method, String& url, HTTPVersion&); | 116 PLATFORM_EXPORT size_t parseHTTPRequestLine(const char* data, size_t length, Str ing& failureReason, String& method, String& url, HTTPVersion&); |
| 116 PLATFORM_EXPORT size_t parseHTTPHeader(const char* data, size_t length, String& failureReason, AtomicString& nameStr, AtomicString& valueStr); | 117 PLATFORM_EXPORT size_t parseHTTPHeader(const char* data, size_t length, String& failureReason, AtomicString& nameStr, AtomicString& valueStr); |
| 117 PLATFORM_EXPORT size_t parseHTTPRequestBody(const char* data, size_t length, Vec tor<unsigned char>& body); | 118 PLATFORM_EXPORT size_t parseHTTPRequestBody(const char* data, size_t length, Vec tor<unsigned char>& body); |
| 118 | 119 |
| 119 } | 120 } |
| 120 | 121 |
| 121 #endif | 122 #endif |
| OLD | NEW |