aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Uri.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp
index de35f84..f122c0a 100644
--- a/src/Uri.cpp
+++ b/src/Uri.cpp
@@ -537,7 +537,7 @@ namespace Uri {
case 0: { // first character
if (c == '[') {
host.push_back(c);
- decoderState = 4;
+ decoderState = 3;
break;
} else {
decoderState = 1;
@@ -549,7 +549,7 @@ namespace Uri {
pecDecoder = PercentEncodedCharacterDecoder();
decoderState = 2;
} else if (c == ':') {
- decoderState = 9;
+ decoderState = 8;
} else {
if (
IsCharacterInSet(
@@ -586,38 +586,38 @@ namespace Uri {
}
} break;
- case 4: { // IP-literal
+ case 3: { // IP-literal
if (c == 'v') {
host.push_back(c);
- decoderState = 6;
+ decoderState = 5;
break;
} else {
- decoderState = 5;
+ decoderState = 4;
}
}
- case 5: { // IPv6Address
+ case 4: { // IPv6Address
// TODO: research this offline first
// before attempting to code it
host.push_back(c);
if (c == ']') {
- decoderState = 8;
+ decoderState = 7;
}
} break;
- case 6: { // IPvFuture: v ...
+ case 5: { // IPvFuture: v ...
if (c == '.') {
- decoderState = 7;
+ decoderState = 6;
} else if (!IsCharacterInSet(c, {'0','9', 'A','F'})) {
return false;
}
host.push_back(c);
} break;
- case 7: { // IPvFuture v 1*HEXDIG . ...
+ case 6: { // IPvFuture v 1*HEXDIG . ...
host.push_back(c);
if (c == ']') {
- decoderState = 8;
+ decoderState = 7;
} else if (
!IsCharacterInSet(
c,
@@ -640,16 +640,16 @@ namespace Uri {
}
} break;
- case 8: { // illegal to have anything else, unless it's a colon,
+ case 7: { // illegal to have anything else, unless it's a colon,
// in which case it's a port delimiter
if (c == ':') {
- decoderState = 9;
+ decoderState = 8;
} else {
return false;
}
} break;
- case 9: { // port
+ case 8: { // port
portString.push_back(c);
} break;
}