You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1141,6 +1141,24 @@ Serving HTTP on 0.0.0.0 port 80 ...
1141
1141
NOTE
1142
1142
----
1143
1143
1144
+
### Regular Expression Stack Overflow
1145
+
1146
+
> [!CAUTION]
1147
+
> When using complex regex patterns in route handlers, be aware that certain patterns may cause stack overflow during pattern matching. This is a known issue with `std::regex` implementations and affects the `dispatch_request()` method.
1148
+
>
1149
+
> ```cpp
1150
+
> // This pattern can cause stack overflow with large input
1151
+
> svr.Get(".*", handler);
1152
+
> ```
1153
+
>
1154
+
> Consider using simpler patterns or path parameters to avoid this issue:
> svr.Get(R"(/api/v\d+/.*)", handler); // More specific patterns
1160
+
> ```
1161
+
1144
1162
### g++
1145
1163
1146
1164
g++ 4.8and below cannot build this library since `<regex>` in the versions are [broken](https://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions).
0 commit comments