Update to 0.2.5 version

- Added support for uploading a configuration file over a long path
 - Added support for special uri paths (using the "*" symbol) in the configuration for groups of similar uri paths
 - Added the function of reading the contents of an http request
 - Changed the format of the uri address in the configuration file
 - Added a request redirection module
 - Added a module for blocking access to files by url path
 - Updated documentation
 - Updated module examples
This commit is contained in:
2024-06-13 00:42:58 +05:00
parent aca8a10141
commit aa78c565af
28 changed files with 670 additions and 149 deletions

View File

@@ -47,7 +47,7 @@ unit_init:
;unit init successful
.exit:
pop edi esi
ret 8
ret 12
server_entry:
@@ -58,14 +58,33 @@ server_entry:
cmp dword[edi], 0
je .no_cmd
mov edx, [esi + CONNECT_DATA.uri_path]
xor ecx, ecx
dec ecx
@@:
inc ecx
cmp byte[edx + ecx], 0
jne @b
push ecx
add edi, 4
invoke IMPORT.create_resp, esi, 0
invoke IMPORT.create_resp, esi, FLAG_TRANSFER_CHUNKED\
+ FLAG_NO_CONTENT_LENGTH
test eax, eax
jz .exit
push eax
invoke IMPORT.begin_send_resp, eax, 0, 0
mov eax, [esp]
invoke IMPORT.send_resp, eax, edi, [edi - 4]
mov eax, [esp]
invoke IMPORT.send_resp, eax, text_br, text_br.size
mov eax, [esp]
invoke IMPORT.send_resp, eax,\
[esi + CONNECT_DATA.uri_path],\
[esp + 4]
invoke IMPORT.destruct_resp ; arg in stack
add esp, 4
.exit:
pop edi esi
ret 8
@@ -89,6 +108,9 @@ section '.data' data readable writable align 16
text_no_cmd:
db 'For this unit in config not set arguments'
.size = $ - text_no_cmd
text_br:
db '<br>'
.size = $ - text_br
@EXPORT:
export \