mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 00:08:30 +00:00
Have redbean show zip listing as default / handler
If an "index.lua" or "index.html" doesn't exist in zip file or the filesystem, and no redirects have been defined for it either, then redbean will render a listing of the zip central directory content only if the request uri points to the root path.
This commit is contained in:
parent
ae300d0c40
commit
1753b669cf
10 changed files with 436 additions and 112 deletions
|
@ -16,8 +16,8 @@ GET, kHttpGet
|
|||
HEAD, kHttpHead
|
||||
POST, kHttpPost
|
||||
PUT, kHttpPut
|
||||
CONNECT, kHttpConnect
|
||||
OPTIONS, kHttpOptions
|
||||
CONNECT, kHttpConnect
|
||||
TRACE, kHttpTrace
|
||||
COPY, kHttpCopy
|
||||
LOCK, kHttpLock
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#define kHttpPost 2
|
||||
#define kHttpPut 3
|
||||
#define kHttpDelete 4
|
||||
#define kHttpConnect 5
|
||||
#define kHttpOptions 6
|
||||
#define kHttpOptions 5
|
||||
#define kHttpConnect 6
|
||||
#define kHttpTrace 7
|
||||
#define kHttpCopy 8
|
||||
#define kHttpLock 9
|
||||
|
@ -89,8 +89,7 @@ struct HttpRequestSlice {
|
|||
};
|
||||
|
||||
struct HttpRequest {
|
||||
int i, t, a;
|
||||
int method;
|
||||
int i, t, a, method;
|
||||
struct HttpRequestSlice k;
|
||||
struct HttpRequestSlice uri;
|
||||
struct HttpRequestSlice version;
|
||||
|
|
|
@ -24,8 +24,8 @@ const char kHttpMethod[17][8] = {
|
|||
"POST", //
|
||||
"PUT", //
|
||||
"DELETE", //
|
||||
"CONNECT", //
|
||||
"OPTIONS", //
|
||||
"CONNECT", //
|
||||
"TRACE", //
|
||||
"COPY", //
|
||||
"LOCK", //
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue