René's URL Explorer Experiment


Title: [BUG] Query parameters missing in get_args() result if path arguments are used. · Issue #342 · etr/libhttpserver · GitHub

Open Graph Title: [BUG] Query parameters missing in get_args() result if path arguments are used. · Issue #342 · etr/libhttpserver

X Title: [BUG] Query parameters missing in get_args() result if path arguments are used. · Issue #342 · etr/libhttpserver

Description: Prerequisites Put an X between the brackets on this line if you have checked that your issue isn't already filed: https://github.com/search?l=&q=repo:etr/libhttpserver&type=Issues Description The result from calling http_request::get...

Open Graph Description: Prerequisites Put an X between the brackets on this line if you have checked that your issue isn't already filed: https://github.com/search?l=&q=repo:etr/libhttpserver&type=Issues Description T...

X Description: Prerequisites Put an X between the brackets on this line if you have checked that your issue isn't already filed: https://github.com/search?l=&q=repo:etr/libhttpserver&type=Issues D...

Opengraph URL: https://github.com/etr/libhttpserver/issues/342

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Query parameters missing in get_args() result if path arguments are used.","articleBody":"### Prerequisites\r\n\r\n* [X] Put an X between the brackets on this line if you have checked that your issue isn't already filed: https://github.com/search?l=\u0026q=repo%3Aetr%2Flibhttpserver\u0026type=Issues\r\n\r\n### Description\r\n\r\nThe result from calling `http_request::get_args()` will not contain URL query parameters if the resource URL has path parameters. This is due to `webserver::finalize_answer(...)` calling `http_server::set_arg(...)` for each URL path argument, thus rendering `http_request::cache::unescaped_args` non-empty. `http_request::get_args()` will call `http_request::populate_args()`, which will do nothing if `unescaped_args` is non-empty.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Change line `examples/hello_with_get_arg.cpp:26` from\r\n```\r\nreturn std::shared_ptr\u003chttpserver::http_response\u003e(new httpserver::string_response(\"Hello: \" + std::string(req.get_arg(\"name\"))));\r\n```\r\nto\r\n```\r\nreturn std::shared_ptr\u003chttpserver::http_response\u003e(new httpserver::string_response(std::string(req.get_arg(\"greeting\")) + \", \" + std::string(req.get_arg(\"name\"))));\r\n```\r\n2. Change line `examples/hello_with_get_arg.cpp:34` from\r\n```\r\nws.register_resource(\"/hello\", \u0026hwr);\r\n```\r\nto lines\r\n```\r\nhwr.disallow_all();\r\nhwr.set_allowing(\"GET\", true);\r\nws.register_resource(\"/{greeting}\", \u0026hwr);\r\n```\r\n3. Build and start example server `hello_with_get_arg` in a terminal.\r\n4. In a second terminal, run `curl http://localhost:8080/Howdy?name=Bob`\r\n\r\n**Expected behavior:** Server responds with text \"Howdy, Bob\"\r\n\r\n**Actual behavior:** Server responds with \"Howdy, \"\r\n\r\n**Reproduces how often:** 100%\r\n\r\n### Versions\r\n\r\n* OS version `Linux gd 6.8.0-50-generic #51~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 21 12:03:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux`\r\n* libhttpserver version 0.19.0, compiled\r\n* libmicrohttpd version 1.0.1, compiled\r\n\r\n### Additional Information\r\nFull example program, modified as specified in steps to reproduce.\r\n```\r\n#include \u003chttpserver.hpp\u003e\r\n\r\nclass hello_world_resource : public httpserver::http_resource {\r\n public:\r\n     std::shared_ptr\u003chttpserver::http_response\u003e render(const httpserver::http_request\u0026 req) {\r\n         return std::shared_ptr\u003chttpserver::http_response\u003e(new httpserver::string_response(std::string(req.get_arg(\"greeting\")) + \", \" + std::string(req.get_arg(\"name\"))));\r\n     }\r\n};\r\n\r\nint main() {\r\n    httpserver::webserver ws = httpserver::create_webserver(8080);\r\n\r\n    hello_world_resource hwr;\r\n    hwr.disallow_all();\r\n    hwr.set_allowing(\"GET\", true);\r\n    ws.register_resource(\"/{greeting}\", \u0026hwr);\r\n    ws.start(true);\r\n\r\n    return 0;\r\n}\r\n```\r\n","author":{"url":"https://github.com/dimitriadis-georgios","@type":"Person","name":"dimitriadis-georgios"},"datePublished":"2025-01-07T16:16:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/342/libhttpserver/issues/342"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:edd169fb-daeb-3902-aca9-8df1541432b9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA46A:3D21D:25445A7:3358905:6964DA6C
html-safe-noncee0147fa8992a369ff4356af41682b30934fb5bd1a90fc93e08d60e676005e54b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDZBOjNEMjFEOjI1NDQ1QTc6MzM1ODkwNTo2OTY0REE2QyIsInZpc2l0b3JfaWQiOiI3NDc2ODk1MjUzNTI4ODk0MDYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0e7576acf09aed077306a93a89a910c0cf64504de3cda0f798c0aff9c57f0107
hovercard-subject-tagissue:2773233332
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/etr/libhttpserver/342/issue_layout
twitter:imagehttps://opengraph.githubassets.com/046caeff82e084d154b1b803347e0c563fe4d5760f0804d812f7af33cf5c4993/etr/libhttpserver/issues/342
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/046caeff82e084d154b1b803347e0c563fe4d5760f0804d812f7af33cf5c4993/etr/libhttpserver/issues/342
og:image:altPrerequisites Put an X between the brackets on this line if you have checked that your issue isn't already filed: https://github.com/search?l=&q=repo:etr/libhttpserver&type=Issues Description T...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedimitriadis-georgios
hostnamegithub.com
expected-hostnamegithub.com
None5838582163a1256e5ebd5086b7e1dc5cea93d82086c9c8b1395fb50f6ddab28d
turbo-cache-controlno-preview
go-importgithub.com/etr/libhttpserver git https://github.com/etr/libhttpserver.git
octolytics-dimension-user_id1201536
octolytics-dimension-user_loginetr
octolytics-dimension-repository_id3416891
octolytics-dimension-repository_nwoetr/libhttpserver
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3416891
octolytics-dimension-repository_network_root_nwoetr/libhttpserver
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
release8f997e7f84bd1db9537ba403fa68be0da3423594
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/etr/libhttpserver/issues/342#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fetr%2Flibhttpserver%2Fissues%2F342
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%2Fetr%2Flibhttpserver%2Fissues%2F342
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=etr%2Flibhttpserver
Reloadhttps://github.com/etr/libhttpserver/issues/342
Reloadhttps://github.com/etr/libhttpserver/issues/342
Reloadhttps://github.com/etr/libhttpserver/issues/342
etr https://github.com/etr
libhttpserverhttps://github.com/etr/libhttpserver
Notifications https://github.com/login?return_to=%2Fetr%2Flibhttpserver
Fork 191 https://github.com/login?return_to=%2Fetr%2Flibhttpserver
Star 942 https://github.com/login?return_to=%2Fetr%2Flibhttpserver
Code https://github.com/etr/libhttpserver
Issues 40 https://github.com/etr/libhttpserver/issues
Pull requests 11 https://github.com/etr/libhttpserver/pulls
Actions https://github.com/etr/libhttpserver/actions
Projects 0 https://github.com/etr/libhttpserver/projects
Wiki https://github.com/etr/libhttpserver/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/etr/libhttpserver/security
Please reload this pagehttps://github.com/etr/libhttpserver/issues/342
Insights https://github.com/etr/libhttpserver/pulse
Code https://github.com/etr/libhttpserver
Issues https://github.com/etr/libhttpserver/issues
Pull requests https://github.com/etr/libhttpserver/pulls
Actions https://github.com/etr/libhttpserver/actions
Projects https://github.com/etr/libhttpserver/projects
Wiki https://github.com/etr/libhttpserver/wiki
Security https://github.com/etr/libhttpserver/security
Insights https://github.com/etr/libhttpserver/pulse
New issuehttps://github.com/login?return_to=https://github.com/etr/libhttpserver/issues/342
New issuehttps://github.com/login?return_to=https://github.com/etr/libhttpserver/issues/342
[BUG] Query parameters missing in get_args() result if path arguments are used.https://github.com/etr/libhttpserver/issues/342#top
https://github.com/etr
bugConfirmed bugs or reports that are very likely to be bugs.https://github.com/etr/libhttpserver/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/dimitriadis-georgios
https://github.com/dimitriadis-georgios
dimitriadis-georgioshttps://github.com/dimitriadis-georgios
on Jan 7, 2025https://github.com/etr/libhttpserver/issues/342#issue-2773233332
https://github.com/search?l=&q=repo%3Aetr%2Flibhttpserver&type=Issueshttps://github.com/search?l=&q=repo%3Aetr%2Flibhttpserver&type=Issues
etrhttps://github.com/etr
bugConfirmed bugs or reports that are very likely to be bugs.https://github.com/etr/libhttpserver/issues?q=state%3Aopen%20label%3A%22bug%22
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.