|
1 |
| -/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */ |
| 1 | +/* auto-generated on 2023-06-03 12:40:57 -0400. Do not edit! */ |
2 | 2 | /* begin file include/ada.h */
|
3 | 3 | /**
|
4 | 4 | * @file ada.h
|
@@ -5544,7 +5544,11 @@ ada_really_inline size_t url::parse_port(std::string_view view,
|
5544 | 5544 | }
|
5545 | 5545 | ada_log("parse_port: is_valid = ", is_valid);
|
5546 | 5546 | if (is_valid) {
|
5547 |
| - port = (r.ec == std::errc() && scheme_default_port() != parsed_port) |
| 5547 | + // scheme_default_port can return 0, and we should allow 0 as a base port. |
| 5548 | + auto default_port = scheme_default_port(); |
| 5549 | + bool is_port_valid = (default_port == 0 && parsed_port == 0) || |
| 5550 | + (default_port != parsed_port); |
| 5551 | + port = (r.ec == std::errc() && is_port_valid) |
5548 | 5552 | ? std::optional<uint16_t>(parsed_port)
|
5549 | 5553 | : std::nullopt;
|
5550 | 5554 | }
|
@@ -6428,7 +6432,12 @@ ada_really_inline size_t url_aggregator::parse_port(
|
6428 | 6432 | }
|
6429 | 6433 | ada_log("parse_port: is_valid = ", is_valid);
|
6430 | 6434 | if (is_valid) {
|
6431 |
| - if (r.ec == std::errc() && scheme_default_port() != parsed_port) { |
| 6435 | + ada_log("parse_port", r.ec == std::errc()); |
| 6436 | + // scheme_default_port can return 0, and we should allow 0 as a base port. |
| 6437 | + auto default_port = scheme_default_port(); |
| 6438 | + bool is_port_valid = (default_port == 0 && parsed_port == 0) || |
| 6439 | + (default_port != parsed_port); |
| 6440 | + if (r.ec == std::errc() && is_port_valid) { |
6432 | 6441 | update_base_port(parsed_port);
|
6433 | 6442 | } else {
|
6434 | 6443 | clear_port();
|
@@ -6485,14 +6494,14 @@ inline std::ostream &operator<<(std::ostream &out,
|
6485 | 6494 | #ifndef ADA_ADA_VERSION_H
|
6486 | 6495 | #define ADA_ADA_VERSION_H
|
6487 | 6496 |
|
6488 |
| -#define ADA_VERSION "2.5.0" |
| 6497 | +#define ADA_VERSION "2.5.1" |
6489 | 6498 |
|
6490 | 6499 | namespace ada {
|
6491 | 6500 |
|
6492 | 6501 | enum {
|
6493 | 6502 | ADA_VERSION_MAJOR = 2,
|
6494 | 6503 | ADA_VERSION_MINOR = 5,
|
6495 |
| - ADA_VERSION_REVISION = 0, |
| 6504 | + ADA_VERSION_REVISION = 1, |
6496 | 6505 | };
|
6497 | 6506 |
|
6498 | 6507 | } // namespace ada
|
|
0 commit comments