René's URL Explorer Experiment


Title: Exception in async_server_base/async_connection during port scanning (nmap) · Issue #677 · cpp-netlib/cpp-netlib · GitHub

Open Graph Title: Exception in async_server_base/async_connection during port scanning (nmap) · Issue #677 · cpp-netlib/cpp-netlib

X Title: Exception in async_server_base/async_connection during port scanning (nmap) · Issue #677 · cpp-netlib/cpp-netlib

Description: When boost::network::http::server is listening for new connections, it sometimes throws the following exception from it's run() method (or asio::io_service::run()) when the host is being port scanned using nmap: boost::exception_detail::...

Open Graph Description: When boost::network::http::server is listening for new connections, it sometimes throws the following exception from it's run() method (or asio::io_service::run()) when the host is being port scann...

X Description: When boost::network::http::server is listening for new connections, it sometimes throws the following exception from it's run() method (or asio::io_service::run()) when the host is being port s...

Opengraph URL: https://github.com/cpp-netlib/cpp-netlib/issues/677

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception in async_server_base/async_connection during port scanning (nmap)","articleBody":"When `boost::network::http::server` is listening for new connections, it sometimes throws the following exception from it's `run()` method (or `asio::io_service::run()`) when the host is being port scanned using nmap:\n\n```\nboost::exception_detail::clone_impl\u003cboost::exception_detail::error_info_injector\u003cstd::system_error\u003e\u003e\nremote_endpoint: Transport endpoint is not connected\n```\n\nAfter the exception servers stops accepting connections even if event loop is restarted and has to be `stop()`'ed and `listen()``ed again. In my tests, depending on the system, this may happen every time the host in nmap'ed or require several consequent nmaps.\n\nThis bug actually has already been reported (issue #360), but for an old version of cpp-netlib and there was no activity, so i decided to open a new issue. I am experiencing this problem with cpp-netlib 0.12.0.\n\nI have fixed the issue in my project with the following patch. I am unsure if i have fixed it the right way (for example, i might have introduced breaking API change in `stream_handler::remote_endpoint()`), but if it is ok, i can send a pull request.\n\n```\ndiff --git a/boost/network/protocol/http/server/async_connection.hpp b/boost/network/protocol/http/server/async_connection.hpp\nindex 915c6fb..eca2f68 100644\n--- a/boost/network/protocol/http/server/async_connection.hpp\n+++ b/boost/network/protocol/http/server/async_connection.hpp\n@@ -462,11 +462,18 @@ struct async_connection\n   enum state_t { method, uri, version, headers };\n\n   void start() {\n-    typename ostringstream\u003cTag\u003e::type ip_stream;\n-    ip_stream \u003c\u003c socket_.remote_endpoint().address().to_string() \u003c\u003c ':'\n-              \u003c\u003c socket_.remote_endpoint().port();\n-    request_.source = ip_stream.str();\n-    read_more(method);\n+    std::error_code ec;\n+    auto remote_endpoint = socket_.remote_endpoint(ec);\n+    \n+    if (ec) {\n+      error_encountered = in_place\u003cstd::system_error\u003e(ec);\n+    } else {\n+      typename ostringstream\u003cTag\u003e::type ip_stream;\n+      ip_stream \u003c\u003c remote_endpoint.address().to_string() \u003c\u003c ':'\n+                \u003c\u003c remote_endpoint.port();\n+      request_.source = ip_stream.str();\n+      read_more(method);\n+    }\n   }\n\n   void read_more(state_t state) {\ndiff --git a/boost/network/protocol/stream_handler.hpp b/boost/network/protocol/stream_handler.hpp\nindex 16fafc6..9d82706 100644\n--- a/boost/network/protocol/stream_handler.hpp\n+++ b/boost/network/protocol/stream_handler.hpp\n@@ -109,11 +109,11 @@ struct stream_handler {\n     }\n   }\n\n-  tcp_socket::endpoint_type remote_endpoint() const {\n+  tcp_socket::endpoint_type remote_endpoint(std::error_code\u0026 ec) const {\n     if (ssl_enabled) {\n-      return ssl_sock_-\u003enext_layer().remote_endpoint();\n+      return ssl_sock_-\u003enext_layer().remote_endpoint(ec);\n     } else {\n-      return tcp_sock_-\u003eremote_endpoint();\n+      return tcp_sock_-\u003eremote_endpoint(ec);\n     }\n   }\n\n```\n","author":{"url":"https://github.com/vovams","@type":"Person","name":"vovams"},"datePublished":"2016-08-08T15:07:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/677/cpp-netlib/issues/677"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:465058c9-1796-584c-e403-e7a22d65f828
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE9A4:343EA:178A618:1FD3E89:696EAD83
html-safe-nonce80860c5987f460513b87f1204e625c8e9389930d563ae07ec5c86e095e61e170
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUE0OjM0M0VBOjE3OEE2MTg6MUZEM0U4OTo2OTZFQUQ4MyIsInZpc2l0b3JfaWQiOiI4OTg1NTI3NTk3NTk4NDI2OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac18f1d39315a9998a49c38c03a5218a8d007d8e926611308ebce7dbc88c2bfe46
hovercard-subject-tagissue:169946271
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cpp-netlib/cpp-netlib/677/issue_layout
twitter:imagehttps://opengraph.githubassets.com/312490f0d47091c09def01fb920bf50e3f2564e31ad8b9189fac030501a5beb3/cpp-netlib/cpp-netlib/issues/677
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/312490f0d47091c09def01fb920bf50e3f2564e31ad8b9189fac030501a5beb3/cpp-netlib/cpp-netlib/issues/677
og:image:altWhen boost::network::http::server is listening for new connections, it sometimes throws the following exception from it's run() method (or asio::io_service::run()) when the host is being port scann...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevovams
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
turbo-cache-controlno-preview
go-importgithub.com/cpp-netlib/cpp-netlib git https://github.com/cpp-netlib/cpp-netlib.git
octolytics-dimension-user_id192422
octolytics-dimension-user_logincpp-netlib
octolytics-dimension-repository_id494068
octolytics-dimension-repository_nwocpp-netlib/cpp-netlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id469399
octolytics-dimension-repository_parent_nwoglynos/cpp-netlib
octolytics-dimension-repository_network_root_id469399
octolytics-dimension-repository_network_root_nwoglynos/cpp-netlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cpp-netlib/cpp-netlib/issues/677#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcpp-netlib%2Fcpp-netlib%2Fissues%2F677
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcpp-netlib%2Fcpp-netlib%2Fissues%2F677
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=cpp-netlib%2Fcpp-netlib
Reloadhttps://github.com/cpp-netlib/cpp-netlib/issues/677
Reloadhttps://github.com/cpp-netlib/cpp-netlib/issues/677
Reloadhttps://github.com/cpp-netlib/cpp-netlib/issues/677
cpp-netlib https://github.com/cpp-netlib
cpp-netlibhttps://github.com/cpp-netlib/cpp-netlib
glynos/cpp-netlibhttps://github.com/glynos/cpp-netlib
Notifications https://github.com/login?return_to=%2Fcpp-netlib%2Fcpp-netlib
Fork 425 https://github.com/login?return_to=%2Fcpp-netlib%2Fcpp-netlib
Star 2k https://github.com/login?return_to=%2Fcpp-netlib%2Fcpp-netlib
Code https://github.com/cpp-netlib/cpp-netlib
Issues 163 https://github.com/cpp-netlib/cpp-netlib/issues
Pull requests 8 https://github.com/cpp-netlib/cpp-netlib/pulls
Actions https://github.com/cpp-netlib/cpp-netlib/actions
Projects 0 https://github.com/cpp-netlib/cpp-netlib/projects
Wiki https://github.com/cpp-netlib/cpp-netlib/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/cpp-netlib/cpp-netlib/security
Please reload this pagehttps://github.com/cpp-netlib/cpp-netlib/issues/677
Insights https://github.com/cpp-netlib/cpp-netlib/pulse
Code https://github.com/cpp-netlib/cpp-netlib
Issues https://github.com/cpp-netlib/cpp-netlib/issues
Pull requests https://github.com/cpp-netlib/cpp-netlib/pulls
Actions https://github.com/cpp-netlib/cpp-netlib/actions
Projects https://github.com/cpp-netlib/cpp-netlib/projects
Wiki https://github.com/cpp-netlib/cpp-netlib/wiki
Security https://github.com/cpp-netlib/cpp-netlib/security
Insights https://github.com/cpp-netlib/cpp-netlib/pulse
New issuehttps://github.com/login?return_to=https://github.com/cpp-netlib/cpp-netlib/issues/677
New issuehttps://github.com/login?return_to=https://github.com/cpp-netlib/cpp-netlib/issues/677
Exception in async_server_base/async_connection during port scanning (nmap)https://github.com/cpp-netlib/cpp-netlib/issues/677#top
https://github.com/vovams
https://github.com/vovams
vovamshttps://github.com/vovams
on Aug 8, 2016https://github.com/cpp-netlib/cpp-netlib/issues/677#issue-169946271
#360https://github.com/cpp-netlib/cpp-netlib/issues/360
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.