44,14 → 44,13 |
end virtual |
|
macro copy_till_zero { |
local .copyloop, .copydone |
.copyloop: |
@@: |
lodsb |
test al, al |
jz .copydone |
jz @f |
stosb |
jmp .copyloop |
.copydone: |
jmp @r |
@@: |
} |
|
macro HTTP_init_buffer buffer, socketnum { |
189,14 → 188,6 |
mov esi, [hostname] |
copy_till_zero |
|
cmp byte[proxyUser], 0 |
je @f |
call append_proxy_auth_header |
@@: |
|
mov ax, 0x0a0d |
stosw |
|
mov esi, [add_header] |
test esi, esi |
jz @f |
203,6 → 194,11 |
copy_till_zero |
@@: |
|
cmp byte[proxyUser], 0 |
je @f |
call append_proxy_auth_header |
@@: |
|
mov esi, str_close |
mov ecx, str_close.length |
rep movsb |
303,14 → 299,6 |
mov esi, [hostname] |
copy_till_zero |
|
cmp byte[proxyUser], 0 |
je @f |
call append_proxy_auth_header |
@@: |
|
mov ax, 0x0a0d |
stosw |
|
mov esi, [add_header] |
test esi, esi |
jz @f |
317,6 → 305,11 |
copy_till_zero |
@@: |
|
cmp byte[proxyUser], 0 |
je @f |
call append_proxy_auth_header |
@@: |
|
mov esi, str_close |
mov ecx, str_close.length |
rep movsb |
433,14 → 426,6 |
mov esi, [content_type] |
copy_till_zero |
|
cmp byte[proxyUser], 0 |
je @f |
call append_proxy_auth_header |
@@: |
|
mov ax, 0x0a0d |
stosw |
|
mov esi, [add_header] |
test esi, esi |
jz @f |
447,6 → 432,11 |
copy_till_zero |
@@: |
|
cmp byte[proxyUser], 0 |
je @f |
call append_proxy_auth_header |
@@: |
|
mov esi, str_close |
mov ecx, str_close.length |
rep movsb |
1600,10 → 1590,10 |
.length = $ - str_post_cl |
str_post_ct db 13, 10, 'Content-Type: ' |
.length = $ - str_post_ct |
str_close db 13, 10, 'User-Agent: KolibriOS libHTTP/1.0', 13, 10, 'Connection: Close', 13, 10, 13, 10 |
.length = $ - str_close |
str_proxy_auth db 13, 10, 'Proxy-Authorization: Basic ' |
.length = $ - str_proxy_auth |
str_close db 'User-Agent: KolibriOS libHTTP/1.0', 13, 10, 'Connection: Close', 13, 10, 13, 10 |
.length = $ - str_close |
|
str_http db 'http://', 0 |
|