Rev 4830 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4830 | Rev 5534 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2014. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2014-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; pasta.asm - Paste something to paste.kolibrios.org using POST ;; |
6 | ;; pasta.asm - Paste something to paste.kolibrios.org using POST ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
Line 40... | Line 40... | ||
40 | ; load libraries |
40 | ; load libraries |
41 | stdcall dll.Load, @IMPORT |
41 | stdcall dll.Load, @IMPORT |
42 | test eax, eax |
42 | test eax, eax |
43 | jnz exit |
43 | jnz exit |
Line 44... | Line 44... | ||
44 | 44 | ||
45 | invoke HTTP_get, sz_url, 0 |
45 | invoke HTTP_get, sz_url, 0, 0, 0 |
46 | test eax, eax |
46 | test eax, eax |
47 | jz error |
47 | jz error |
Line 48... | Line 48... | ||
48 | mov [identifier], eax |
48 | mov [identifier], eax |
49 | 49 | ||
50 | .again: |
50 | .again: |
51 | invoke HTTP_process, [identifier] |
51 | invoke HTTP_receive, [identifier] |
Line 52... | Line 52... | ||
52 | test eax, eax |
52 | test eax, eax |
53 | jnz .again |
53 | jnz .again |
Line 76... | Line 76... | ||
76 | xor al, al |
76 | xor al, al |
77 | stosb |
77 | stosb |
Line 78... | Line 78... | ||
78 | 78 | ||
Line 79... | Line 79... | ||
79 | invoke HTTP_free, [identifier] |
79 | invoke HTTP_free, [identifier] |
80 | 80 | ||
81 | invoke HTTP_post, sz_url, sz_cookie, sz_ctype, sz_paste.length |
81 | invoke HTTP_post, sz_url, 0, 0, sz_cookie, sz_ctype, sz_paste.length |
82 | test eax, eax |
82 | test eax, eax |
Line 83... | Line 83... | ||
83 | jz error |
83 | jz error |
84 | mov [identifier], eax |
84 | mov [identifier], eax |
Line 85... | Line 85... | ||
85 | 85 | ||
86 | mov ecx, [eax + http_msg.socket] |
86 | mov ecx, [eax + http_msg.socket] |
87 | mcall 75, 6, , sz_paste, sz_paste.length, 0 |
87 | mcall 75, 6, , sz_paste, sz_paste.length, 0 |
88 | 88 | ||
Line 89... | Line 89... | ||
89 | .again2: |
89 | .again2: |
90 | invoke HTTP_process, [identifier] |
90 | invoke HTTP_receive, [identifier] |
Line 140... | Line 140... | ||
140 | 140 | ||
Line 141... | Line 141... | ||
141 | library lib_http, 'http.obj' |
141 | library lib_http, 'http.obj' |
142 | 142 | ||
143 | import lib_http, \ |
- | |
144 | HTTP_get, 'get', \ |
- | |
145 | HTTP_process, 'process', \ |
- | |
146 | HTTP_free, 'free', \ |
143 | import lib_http, \ |
- | 144 | HTTP_get, 'get', \ |
|
147 | HTTP_stop, 'stop', \ |
145 | HTTP_post, 'post', \ |
- | 146 | HTTP_receive, 'receive', \ |
|
Line 148... | Line 147... | ||
148 | HTTP_post, 'post', \ |
147 | HTTP_find_header_field, 'find_header_field', \ |
Line 149... | Line 148... | ||
149 | HTTP_find_header_field, 'find_header_field' |
148 | HTTP_free, 'free' |