31 lines
667 B
Plaintext
31 lines
667 B
Plaintext
%{
|
|
#include "libc/str/str.h"
|
|
#include "net/http/http.h"
|
|
#define GPERF_DOWNCASE
|
|
%}
|
|
%compare-strncmp
|
|
%ignore-case
|
|
%language=ANSI-C
|
|
%readonly-tables
|
|
%struct-type
|
|
%define lookup-function-name LookupHttpMethod
|
|
struct HttpMethodSlot { char name[8]; char code; };
|
|
%%
|
|
DELETE, kHttpDelete
|
|
GET, kHttpGet
|
|
HEAD, kHttpHead
|
|
POST, kHttpPost
|
|
PUT, kHttpPut
|
|
CONNECT, kHttpConnect
|
|
OPTIONS, kHttpOptions
|
|
TRACE, kHttpTrace
|
|
COPY, kHttpCopy
|
|
LOCK, kHttpLock
|
|
MERGE, kHttpMerge
|
|
MKCOL, kHttpMkcol
|
|
MOVE, kHttpMove
|
|
NOTIFY, kHttpNotify
|
|
PATCH, kHttpPatch
|
|
REPORT, kHttpReport
|
|
UNLOCK, kHttpUnlock
|