h2o / picohttpparser

tiny HTTP parser written in C (used in HTTP::Parser::XS et al.)
1.83k stars 246 forks source link

Questions about how to use picohttpparser? #41

Closed amirouche closed 4 years ago

amirouche commented 6 years ago

I'd like to use picohttpparser to build a web server using Chez Scheme.

Anyway, apparently it's possible to only parse the headers. The revelant signature is:

int phr_parse_headers(const char *buf, size_t len, struct phr_header *headers, size_t *num_headers, size_t last_len);

I am ok with that. But what can I do with the rest of the response in that case? Any pointers?

I am a newbie regarding building servers and http standard.

Also If I only parse the headers, what happens to the method and path?

TIA!

CandyMi commented 5 years ago

Firt step! You can got test.c to read. But it's seem like broken.

amirouche commented 4 years ago

Personal backlog clean-up.