-
Notifications
You must be signed in to change notification settings - Fork 5
Home
straight-coding edited this page Aug 4, 2020
·
5 revisions
Welcome to the straight-httpd wiki!
- Support
SSDPprotocol: neighbours can detect this virtual device in the network. - Support
HTTPS: all HTTP requests will be redirected to HTTPS (except SSDP XML). BothGETandPOSTare supported. - Support
chunkedresponse: Because the device memory is limited, generally it is not possible to wait for all the data to be ready before replying. When the device begins to return data, it does not know the total length.Transfer-Encoding: chunkedallows you to split the data into chunks of various lengths, so that every chunk is within the device’s memory limit. - Support
rangerequest:Range: bytes=0-allows you to specify a single range. This feature is suitable for paged data, multi-threaded downloading or video fast forwarding. - Support request header
If-Modified-Sincefor browsers to cache static files. - Support simple SSI (“Server Side Includes”) with simple syntax:
<!--#TAG_NAME-->. Note that the syntax does not allow spaces between the "<" and ">". Every tag is a placeholder, which corresponds to a variable. The variable can be HTML content or the initial value of a javascript variable. When the device replies to a request, it will first convert the variable into a string. This string then replaces the corresponding tag. Based on the tag content, the js code can then complete HTML/DOM operations, such as select, checkbox, and radio control etc. - Demo pages include:
- Sign in/out: verify user's username/password, if successful, redirect to "Home", otherwise stay in the login page, the session has 3 minutes timeout after login.
- Home page: show some device information and the current status of the device.
- Upload page: multiple files can be selected and queued to be uploaded to a specific device directory. The concurrency is 1, and every upload process can be terminated separately.
- Files page: you can browse all the files in the specified device directory, enter subdirectories or return to the parent directory.
- Form page: demonstrates parameter modification and saving.