소스 검색

Fixed Request Body reading

pull/4/head
Ethan Ferguson 4 달 전
부모
커밋
8a0a05434e
No known key found for this signature in database GPG 키 ID: 876F56AB5F896F90
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. +8
    -2
      1991.fs

+ 8
- 2
1991.fs 파일 보기

@@ -347,11 +347,17 @@ s" image/x-icon" filetype: ico
0
then ;

: substring-to-end ( index c-addr u -- c-addr u )
rot dup rot swap - rot rot + swap ;

: read-request-body ( socket u -- )
\ Takes the socket and the length of the
\ body (Content-Length).
here swap aligned read-socket
set-request-body ;
2over swap drop swap -
2over substring-to-end
set-request-body
drop ;

: read-request ( socket -- addr u )
\ Returns the request header
\ but also collects the request body.


불러오는 중...
취소
저장