Skip to content

pkg/picohttpparser: add package - #22725

Open
basilfx wants to merge 6 commits into
RIOT-OS:masterfrom
basilfx:feature/pkg-picohttpparser
Open

basilfx wants to merge 6 commits into
RIOT-OS:masterfrom
basilfx:feature/pkg-picohttpparser

Conversation

@basilfx

@basilfx basilfx commented Sep 16, 2026

Copy link
Copy Markdown
Member

Contribution description

This PR adds the PicoHTTPParser package. This is a package that can parse HTTP requests and responses, so you can build webservers and HTTP clients. I have been using this to create two webserver examples (to be contributed).

This package is plain C, fast, does not allocate memory and is simple to use. I think it is a good fit (dual-use), quite a few GitHub stars and still has some active development.

This package currently includes two small patches. Both of them have been upstreamed already:

Testing procedure

A 'smoke test' has been added, which can be executed using make -C tests/pkg/picohttpparser all test.

Issues/PRs references

None

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • Claude Code Sonnet 5 was used to generate the tests. I reviewed the code, restructured the tests and wrote documentation and patches myself.

@basilfx basilfx added Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR AI: Co-Authored PR/Issue relies on AI. Documentation / Code was partly generated by AI. labels Sep 16, 2026
@github-actions github-actions Bot added Area: doc Area: Documentation Area: tests Area: tests and testing framework Area: pkg Area: External package ports labels Sep 16, 2026
PicoHTTPParser is a tiny, primitive fast HTTP request/response
parser. Unlike most parsers, it is stateless and does not allocate
memory by itself.
This test application only 'smoke tests' the PicoHTTPParser
package, because it has its own set of tests that are much more
extensive than the tests in here.
Comment thread pkg/picohttpparser/Makefile Outdated
Comment thread pkg/picohttpparser/doc.md Outdated
Comment thread pkg/picohttpparser/doc.md Outdated
Comment thread pkg/picohttpparser/doc.md Outdated
Comment thread pkg/picohttpparser/doc.md Outdated
Comment thread pkg/picohttpparser/doc.md Outdated
Comment thread pkg/picohttpparser/doc.md Outdated
Comment thread tests/pkg/picohttpparser/main.c Outdated
@crasbe

crasbe commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

A 'smoke test' has been added, which can be executed using make -C tests/pkg/picohttpparser && make -C tests/pkg/picohttpparser test.

You know that you can just run make -C tests/pkg/picohttpparser all test? :D

@basilfx

basilfx commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

You know that you can just run make -C tests/pkg/picohttpparser all test? :D

I think I just got unlucky with some combination of commands not doing what I wanted. So please don't judge ;-P

@riot-ci

riot-ci commented Sep 16, 2026

Copy link
Copy Markdown

Murdock results

✔️ PASSED

bef29da fixup! fixup! tests/pkg/picohttpparser: add test application

Success Failures Total Runtime
11308 0 11308 14m:01s

Artifacts

@basilfx

basilfx commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

I have fixed the char[] aligning (static tests) but kept the other warnings. They would make line length longer, and I don't have a strong opinion on this. I think the PR is ready then. Have not seen any movement on upstream patches yet, but the patches are small and manageable for now. I will update the version if they get upstreamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Co-Authored PR/Issue relies on AI. Documentation / Code was partly generated by AI. Area: doc Area: Documentation Area: pkg Area: External package ports Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants