diff options
author | Omar Polo <op@omarpolo.com> | 2021-02-02 09:48:32 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-02-02 09:48:32 +0000 |
commit | 5f715ce43fa60b2347d6dc64588c5ffe61ebc067 (patch) | |
tree | 567e21b9b231939f46153ec4f071a0f0e2721e92 /gmid.h | |
parent | 3c680bddab146e8c8ccf5eba1fec7e1ee978d638 (diff) |
print the header in the directory listing
Diffstat (limited to 'gmid.h')
-rw-r--r-- | gmid.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -131,12 +131,13 @@ typedef void (*statefn)(struct pollfd*, struct client*); /* * DFA: handle_handshake is the initial state, close_conn the final. + * Sometimes we have an enter_* function to handle the state switch. * * handle_handshake -> handle_open_conn * handle_handshake -> close_conn // on err * * handle_open_conn -> handle_cgi_reply // via open_file/dir/... - * handle_open_conn -> send_directory_listing // ...same + * handle_open_conn -> handle_dirlist // ...same * handle_open_conn -> send_file // ...same * handle_open_conn -> start_reply // on error * @@ -145,6 +146,9 @@ typedef void (*statefn)(struct pollfd*, struct client*); * * handle_cgi -> close_conn * + * handle_dirlist -> send_directory_listing + * handle_dirlist -> close_conn // on error + * * send_directory_listing -> close_conn * * send_file -> close_conn @@ -229,6 +233,8 @@ void start_cgi(const char*, const char*, struct pollfd*, struct client*); void send_file(struct pollfd*, struct client*); void open_dir(struct pollfd*, struct client*); void redirect_canonical_dir(struct pollfd*, struct client*); +void enter_handle_dirlist(struct pollfd*, struct client*); +void handle_dirlist(struct pollfd*, struct client*); int read_next_dir_entry(struct client*); void send_directory_listing(struct pollfd*, struct client*); void cgi_poll_on_child(struct pollfd*, struct client*); |