Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: Source/platform/network/HTTPParsers.h

Issue 99733002: Update HTTPHeaderMap wrappers to use AtomicString type for header values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/network/HTTPHeaderMap.cpp ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 FilterReflectedXSS, 69 FilterReflectedXSS,
70 BlockReflectedXSS 70 BlockReflectedXSS
71 }; 71 };
72 72
73 PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&); 73 PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&);
74 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&); 74 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&);
75 PLATFORM_EXPORT bool isValidHTTPToken(const String&); 75 PLATFORM_EXPORT bool isValidHTTPToken(const String&);
76 PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivM eta, double& delay, String& url); 76 PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivM eta, double& delay, String& url);
77 PLATFORM_EXPORT double parseDate(const String&); 77 PLATFORM_EXPORT double parseDate(const String&);
78 PLATFORM_EXPORT String filenameFromHTTPContentDisposition(const String&); 78 PLATFORM_EXPORT String filenameFromHTTPContentDisposition(const String&);
79 PLATFORM_EXPORT String extractMIMETypeFromMediaType(const String&); 79 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&);
80 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); 80 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&);
81 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0); 81 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0);
82 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL); 82 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL);
83 PLATFORM_EXPORT String extractReasonPhraseFromHTTPStatusLine(const String&); 83 PLATFORM_EXPORT String extractReasonPhraseFromHTTPStatusLine(const String&);
84 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ; 84 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ;
85 85
86 // -1 could be set to one of the return parameters to indicate the value is not specified. 86 // -1 could be set to one of the return parameters to indicate the value is not specified.
87 PLATFORM_EXPORT bool parseRange(const String&, long long& rangeOffset, long long & rangeEnd, long long& rangeSuffixLength); 87 PLATFORM_EXPORT bool parseRange(const String&, long long& rangeOffset, long long & rangeEnd, long long& rangeSuffixLength);
88 88
89 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header); 89 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header);
90 90
91 // Parsing Complete HTTP Messages. 91 // Parsing Complete HTTP Messages.
92 enum HTTPVersion { Unknown, HTTP_1_0, HTTP_1_1 }; 92 enum HTTPVersion { Unknown, HTTP_1_0, HTTP_1_1 };
93 PLATFORM_EXPORT size_t parseHTTPRequestLine(const char* data, size_t length, Str ing& failureReason, String& method, String& url, HTTPVersion&); 93 PLATFORM_EXPORT size_t parseHTTPRequestLine(const char* data, size_t length, Str ing& failureReason, String& method, String& url, HTTPVersion&);
94 PLATFORM_EXPORT size_t parseHTTPHeader(const char* data, size_t length, String& failureReason, AtomicString& nameStr, String& valueStr); 94 PLATFORM_EXPORT size_t parseHTTPHeader(const char* data, size_t length, String& failureReason, AtomicString& nameStr, AtomicString& valueStr);
95 PLATFORM_EXPORT size_t parseHTTPRequestBody(const char* data, size_t length, Vec tor<unsigned char>& body); 95 PLATFORM_EXPORT size_t parseHTTPRequestBody(const char* data, size_t length, Vec tor<unsigned char>& body);
96 96
97 } 97 }
98 98
99 #endif 99 #endif
OLDNEW
« no previous file with comments | « Source/platform/network/HTTPHeaderMap.cpp ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698