mirror of
https://github.com/urlysses/1991.git
synced 2024-11-26 11:38:05 +11:00
Fixed Request Body reading
This commit is contained in:
parent
b1f03d4e41
commit
8a0a05434e
10
1991.fs
10
1991.fs
@ -347,11 +347,17 @@ s" image/x-icon" filetype: ico
|
|||||||
0
|
0
|
||||||
then ;
|
then ;
|
||||||
|
|
||||||
|
: substring-to-end ( index c-addr u -- c-addr u )
|
||||||
|
rot dup rot swap - rot rot + swap ;
|
||||||
|
|
||||||
: read-request-body ( socket u -- )
|
: read-request-body ( socket u -- )
|
||||||
\ Takes the socket and the length of the
|
\ Takes the socket and the length of the
|
||||||
\ body (Content-Length).
|
\ body (Content-Length).
|
||||||
here swap aligned read-socket
|
2over swap drop swap -
|
||||||
set-request-body ;
|
2over substring-to-end
|
||||||
|
set-request-body
|
||||||
|
drop ;
|
||||||
|
|
||||||
: read-request ( socket -- addr u )
|
: read-request ( socket -- addr u )
|
||||||
\ Returns the request header
|
\ Returns the request header
|
||||||
\ but also collects the request body.
|
\ but also collects the request body.
|
||||||
|
Loading…
Reference in New Issue
Block a user