mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Make more major improvements to redbean
- POSIX regular expressions for Lua - Improved protocol parsing and encoding - Additional APIs for ZIP storage retrieval - Fix st_mode issue on NT for regular files - Generalized APIs for URL and Host handling - Worked out the kinks in resource resolution - Allow for custom error pages like /404.html
This commit is contained in:
parent
26ac6871da
commit
4effa23528
74 changed files with 3710 additions and 14246 deletions
|
@ -20,13 +20,13 @@
|
|||
#include "net/http/http.h"
|
||||
|
||||
/**
|
||||
* Returns small number for HTTP method, or -1 if not found.
|
||||
* Returns small number for HTTP method, or 0 if not found.
|
||||
*/
|
||||
int GetHttpMethod(const char *str, size_t len) {
|
||||
const struct HttpMethodSlot *slot;
|
||||
if ((slot = LookupHttpMethod(str, len))) {
|
||||
return slot->code;
|
||||
} else {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue