Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
buggy-web-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sander Nicolausson
buggy-web-server
Commits
b8b06052
Commit
b8b06052
authored
5 years ago
by
Sander Nicolausson
Browse files
Options
Downloads
Patches
Plain Diff
Added try-catch so the server doesn't crash when a big version number is entered
parent
c0bfd99e
No related branches found
No related tags found
No related merge requests found
Pipeline
#46671
failed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
server_http.hpp
+8
-3
8 additions, 3 deletions
server_http.hpp
with
8 additions
and
3 deletions
server_http.hpp
+
8
−
3
View file @
b8b06052
...
...
@@ -739,12 +739,17 @@ namespace SimpleWeb {
return
;
}
}
try
{
if
(
std
::
stof
(
response
->
session
->
request
->
http_version
)
>=
1.1
)
{
auto
new_session
=
std
::
make_shared
<
Session
>
(
this
->
config
.
max_request_streambuf_size
,
response
->
session
->
connection
);
this
->
read
(
new_session
);
return
;
}
}
catch
(
std
::
exception
&
)
{
return
;
}
}
else
if
(
this
->
on_error
)
this
->
on_error
(
response
->
session
->
request
,
ec
);
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment