Skip to content

docs: fix lws_get_urlarg_by_name_safe() buf param description#3565

Closed
pppaulpeter wants to merge 30 commits intowarmcat:mainfrom
pppaulpeter:fix-urlarg-doc-comment
Closed

docs: fix lws_get_urlarg_by_name_safe() buf param description#3565
pppaulpeter wants to merge 30 commits intowarmcat:mainfrom
pppaulpeter:fix-urlarg-doc-comment

Conversation

@pppaulpeter
Copy link
Copy Markdown

Summary

  • The \param buf comment said buf receives the urlarg "including the name= part", but the implementation strips the name= prefix via memmove before returning — buf actually contains only the value
  • Clarified that buf must be sized for the full name=value fragment plus 2 bytes to pass the internal fraglen + 1 < len guard

Context

Discovered while using lws_get_urlarg_by_name_safe() for WebSocket token auth — undersized buffer caused silent lookup failures because fraglen + 1 < len rejected the match.

🤖 Generated with Claude Code

lws-team and others added 30 commits March 30, 2026 19:20
The comment said buf receives the urlarg "including the name= part"
but the implementation strips the name= prefix via memmove before
returning, so buf contains only the value.  Also clarify that buf
must be large enough for the full "name=value" fragment plus 2 bytes
to satisfy the internal fraglen + 1 < len guard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lws-team lws-team force-pushed the main branch 8 times, most recently from e601808 to 250ebbd Compare April 6, 2026 18:38
@pppaulpeter
Copy link
Copy Markdown
Author

Already applied to main via 535c903. Closing.

@pppaulpeter pppaulpeter closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants