Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions src/macros.inc
Original file line number Diff line number Diff line change
Expand Up @@ -425,20 +425,11 @@ parse_request:
jge .400 ; invalid url

; %xx blocks to ascii
mov bx, word [r10 + rcx - 1] ; keep in mind it's still in LE
or rbx, 0010000000100000b
bt rbx, 6+8
; setc al
; shl rax, 8
setc ah
bt rbx, 6
setc al
mov rdx, 39
mul rdx ; rax * 39 -> rdx:rax
sub rbx, rax
and rbx, 0000111100001111b
shl bh, 4
rol bx, 4 ; fix the order
mov bl, byte [r10 + rcx - 2]
mov bh, byte [r10 + rcx - 1]
sub bl, '0'
sub bh, '0'
mov bl, bl * 16 + bh
jmp .loop

.no_hex:
Expand Down
6 changes: 0 additions & 6 deletions src/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,6 @@ start:
Syscall SYS_accept4, r14, NULL, NULL, SOCK_NONBLOCK
cmp rax, 0
jge @f

; this just means another thread already handled this
cmp rax, -EAGAIN ; EWOULDBLOCK also aliases to EAGAIN on linux
je .switch_end

error 20, "failed to accept connection"
@@:

push rax ; fd
Expand Down