145,7 → 145,7 |
ret |
|
.error: |
DEBUGF 2, "Cant close already closed connection!\n" |
DEBUGF 1, "Cant close already closed connection!\n" |
popa |
ret |
|
299,19 → 299,16 |
DEBUGF 1, "Request has been sent to server.\n" |
|
cmp [identifier], 0 |
jne .old_connection |
je .new_connection |
invoke mem.free, [buffer] |
mov eax, [identifier] |
mov [buffer], eax |
.new_connection: |
HTTP_init_buffer [buffer], [socketnum], [flags] |
|
popa |
mov eax, [buffer] ; return buffer ptr |
ret |
|
.old_connection: |
invoke mem.free, [buffer] |
popa |
mov eax, [identifier] |
ret |
|
.error: |
DEBUGF 2, "HTTP GET error!\n" |
popa |
441,19 → 438,16 |
DEBUGF 1, "Request has been sent to server.\n" |
|
cmp [identifier], 0 |
jne .old_connection |
je .new_connection |
invoke mem.free, [buffer] |
mov eax, [identifier] |
mov [buffer], eax |
.new_connection: |
HTTP_init_buffer [buffer], [socketnum], [flags] |
|
popa |
mov eax, [buffer] ; return buffer ptr |
ret |
|
.old_connection: |
invoke mem.free, [buffer] |
popa |
mov eax, [identifier] |
ret |
|
.error: |
DEBUGF 2, "HTTP HEAD error!\n" |
popa |
598,22 → 592,16 |
DEBUGF 1, "Request has been sent to server.\n" |
|
cmp [identifier], 0 |
jne .old_connection |
je .new_connection |
invoke mem.free, [buffer] |
mov eax, [identifier] |
mov [buffer], eax |
.new_connection: |
HTTP_init_buffer [buffer], [socketnum], [flags] |
|
popa |
mov eax, [buffer] ; return buffer ptr |
ret |
|
.old_connection: |
invoke mem.free, [buffer] |
mov ebx, [flags] |
mov eax, [identifier] |
or [eax + http_msg.flags], ebx |
popa |
mov eax, [identifier] |
ret |
|
.error: |
DEBUGF 1, "HTTP POST error!\n" |
popa |
1055,8 → 1043,11 |
.got_all_data: |
DEBUGF 1, "We got all the data! (%u bytes)\n", [ebp + http_msg.content_received] |
or [ebp + http_msg.flags], FLAG_GOT_ALL_DATA |
test [ebp + http_msg.flags], FLAG_KEEPALIVE |
jnz @f |
mcall close, [ebp + http_msg.socket] |
and [ebp + http_msg.flags], not FLAG_CONNECTED |
mcall close, [ebp + http_msg.socket] |
@@: |
popa |
xor eax, eax |
ret |
1901,7 → 1892,7 |
str_close db 'User-Agent: KolibriOS libHTTP/1.1', 13, 10, 'Connection: Close', 13, 10, 13, 10 |
.length = $ - str_close |
str_keep db 'User-Agent: KolibriOS libHTTP/1.1', 13, 10, 'Connection: Keepalive', 13, 10, 13, 10 |
.length = $ - str_close |
.length = $ - str_keep |
|
str_http db 'http://', 0 |
|