| Index: runtime/vm/uri.cc
|
| diff --git a/runtime/vm/uri.cc b/runtime/vm/uri.cc
|
| index 6b8c9c47fbc252cbe486e87ece76fad259b9b724..0e93b570b8620ad472bf0441c31bf2fe344dc66f 100644
|
| --- a/runtime/vm/uri.cc
|
| +++ b/runtime/vm/uri.cc
|
| @@ -14,7 +14,6 @@ static bool IsUnreservedChar(intptr_t value) {
|
| value == '_' || value == '~');
|
| }
|
|
|
| -
|
| static bool IsDelimiter(intptr_t value) {
|
| switch (value) {
|
| case ':':
|
| @@ -41,13 +40,11 @@ static bool IsDelimiter(intptr_t value) {
|
| }
|
| }
|
|
|
| -
|
| static bool IsHexDigit(char value) {
|
| return ((value >= '0' && value <= '9') || (value >= 'A' && value <= 'F') ||
|
| (value >= 'a' && value <= 'f'));
|
| }
|
|
|
| -
|
| static int HexValue(char digit) {
|
| if ((digit >= '0' && digit <= '9')) {
|
| return digit - '0';
|
| @@ -62,7 +59,6 @@ static int HexValue(char digit) {
|
| return 0;
|
| }
|
|
|
| -
|
| static int GetEscapedValue(const char* str, intptr_t pos, intptr_t len) {
|
| if (pos + 2 >= len) {
|
| // Not enough room for a valid escape sequence.
|
| @@ -82,7 +78,6 @@ static int GetEscapedValue(const char* str, intptr_t pos, intptr_t len) {
|
| return HexValue(digit1) * 16 + HexValue(digit2);
|
| }
|
|
|
| -
|
| static char* NormalizeEscapes(const char* str, intptr_t len) {
|
| // Allocate the buffer.
|
| Zone* zone = Thread::Current()->zone();
|
| @@ -129,7 +124,6 @@ static char* NormalizeEscapes(const char* str, intptr_t len) {
|
| return buffer;
|
| }
|
|
|
| -
|
| // Lower-case a string in place.
|
| static void StringLower(char* str) {
|
| const intptr_t len = strlen(str);
|
| @@ -151,7 +145,6 @@ static void StringLower(char* str) {
|
| }
|
| }
|
|
|
| -
|
| static void ClearParsedUri(ParsedUri* parsed_uri) {
|
| parsed_uri->scheme = NULL;
|
| parsed_uri->userinfo = NULL;
|
| @@ -162,7 +155,6 @@ static void ClearParsedUri(ParsedUri* parsed_uri) {
|
| parsed_uri->fragment = NULL;
|
| }
|
|
|
| -
|
| static intptr_t ParseAuthority(const char* authority, ParsedUri* parsed_uri) {
|
| Zone* zone = Thread::Current()->zone();
|
| const char* current = authority;
|
| @@ -196,7 +188,6 @@ static intptr_t ParseAuthority(const char* authority, ParsedUri* parsed_uri) {
|
| return len;
|
| }
|
|
|
| -
|
| // Performs a simple parse of a uri into its components.
|
| // See RFC 3986 Section 3: Syntax.
|
| bool ParseUri(const char* uri, ParsedUri* parsed_uri) {
|
| @@ -259,7 +250,6 @@ bool ParseUri(const char* uri, ParsedUri* parsed_uri) {
|
| return true;
|
| }
|
|
|
| -
|
| static char* RemoveLastSegment(char* current, char* base) {
|
| if (current == base) {
|
| return current;
|
| @@ -275,7 +265,6 @@ static char* RemoveLastSegment(char* current, char* base) {
|
| return current;
|
| }
|
|
|
| -
|
| static intptr_t SegmentLength(const char* input) {
|
| const char* cp = input;
|
|
|
| @@ -289,7 +278,6 @@ static intptr_t SegmentLength(const char* input) {
|
| return cp - input;
|
| }
|
|
|
| -
|
| // See RFC 3986 Section 5.2.4: Remove Dot Segments.
|
| static const char* RemoveDotSegments(const char* path) {
|
| const char* input = path;
|
| @@ -352,7 +340,6 @@ static const char* RemoveDotSegments(const char* path) {
|
| return buffer;
|
| }
|
|
|
| -
|
| // See RFC 3986 Section 5.2.3: Merge Paths.
|
| static const char* MergePaths(const char* base_path, const char* ref_path) {
|
| Zone* zone = Thread::Current()->zone();
|
| @@ -390,7 +377,6 @@ static const char* MergePaths(const char* base_path, const char* ref_path) {
|
| return buffer;
|
| }
|
|
|
| -
|
| static char* BuildUri(const ParsedUri& uri) {
|
| Zone* zone = Thread::Current()->zone();
|
| ASSERT(uri.path != NULL);
|
| @@ -436,7 +422,6 @@ static char* BuildUri(const ParsedUri& uri) {
|
| fragment);
|
| }
|
|
|
| -
|
| // See RFC 3986 Section 5: Reference Resolution
|
| bool ResolveUri(const char* ref_uri,
|
| const char* base_uri,
|
|
|