mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
Move mongoose docs to https://cesanta.com/docs/
PUBLISHED_FROM=ebf5568abe82952ab2751298185a10189098013f
This commit is contained in:
1 parent
f0c6630a16
commit
6e3e5560d0
33 files changed
+98
-193
No files matched your search
+2
-4
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: CGI
|
||||
---
|
||||
# CGI
|
||||
|
||||
[CGI](https://en.wikipedia.org/wiki/Common_Gateway_Interface)
|
||||
is a simple mechanism to generate dynamic content.
|
||||
@@ -32,4 +30,4 @@ Example:
|
||||
NOTE: In the CGI handler we don't use explicitly a system call waitpid() for
|
||||
reaping zombie processes. Instead, we set the SIGCHLD handler to SIG_IGN.
|
||||
It will cause zombie processes to be reaped automatically.
|
||||
CAUTION: not all OSes (e.g. QNX) reap zombies if SIGCHLD is ignored.
|
||||
CAUTION: not all OSes (e.g. QNX) reap zombies if SIGCHLD is ignored.
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: HTTP client example
|
||||
---
|
||||
# HTTP client example
|
||||
|
||||
To create an HTTP client, follow this pattern:
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: Digest Authentication
|
||||
---
|
||||
# Digest Authentication
|
||||
|
||||
Mongoose has a built-in Digest (MD5) authentication support. In order to
|
||||
enable Digest authentication, create a file `.htpasswd` in the directory
|
||||
@@ -8,7 +6,7 @@ you would like to protect. That file should be in the format that Apache's
|
||||
`htdigest` utility.
|
||||
|
||||
You can use either Apache `htdigest` utility, or
|
||||
Mongoose pre-build binary (https://www.cesanta.com/products/binary)
|
||||
Mongoose pre-build binary at https://www.cesanta.com/binary.html
|
||||
to add new users into that file:
|
||||
|
||||
```
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: HTTP events
|
||||
---
|
||||
#: HTTP events
|
||||
|
||||
As discussed in the overview, `mg_set_protocol_http_websocket()` function
|
||||
parses incoming data, treats it as HTTP or WebSocket, and triggers high-level
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: Serving files
|
||||
---
|
||||
# Serving files
|
||||
|
||||
API function `mg_serve_http()` makes it easy to serve files from a filesystem.
|
||||
Generally speaking, that function is an implementation of the HTTP server
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
title: HTTP
|
||||
items:
|
||||
- { name: server_example.md }
|
||||
- { name: client_example.md }
|
||||
- { name: events.md }
|
||||
- { name: files.md }
|
||||
- { name: cgi.md }
|
||||
- { name: ssi.md }
|
||||
- { name: upload.md }
|
||||
- { name: ssl.md }
|
||||
- { name: digest_auth.md }
|
||||
- { name: ../c-api/http.h/ }
|
||||
- { name: ../c-api/http_server.h/ }
|
||||
- { name: ../c-api/http_client.h/ }
|
||||
---
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: HTTP server example
|
||||
---
|
||||
# HTTP server example
|
||||
|
||||
To create an HTTP server, follow this pattern:
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: SSI
|
||||
---
|
||||
# SSI
|
||||
|
||||
Server Side Includes (SSI) is a simple interpreted server-side scripting
|
||||
language which is most commonly used to include the contents of a file
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
---
|
||||
title: Enabling HTTPS
|
||||
---
|
||||
# Enabling SSL (HTTPS)
|
||||
|
||||
To enable SSL on the server side, please follow these steps:
|
||||
|
||||
|
||||
+5
-7
@@ -1,14 +1,12 @@
|
||||
---
|
||||
title: Handling file uploads
|
||||
---
|
||||
# Handling file uploads
|
||||
|
||||
In order to handle file uploads, use the following HTML snippet:
|
||||
|
||||
```HTML
|
||||
<form method="POST" action="/upload" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<input type="submit" value="Upload">
|
||||
</form>
|
||||
<form method="POST" action="/upload" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<input type="submit" value="Upload">
|
||||
</form>
|
||||
```
|
||||
|
||||
Uploaded files will be sent to the `/upload` endpoint via the `POST` request.
|
||||
|
||||
Reference in new issue
Block a user