Rev 4558 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4558 | Rev 4563 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | ?define T_LAST_SLIDE "This slide is the last" |
41 | ?define T_LAST_SLIDE "This slide is the last" |
42 | char loading[] = "Loading... |
42 | char loading[] = "Loading... |
43 | unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; |
43 | unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; |
44 | #endif |
44 | #endif |
Line 45... | Line 45... | ||
45 | 45 | ||
Line 46... | Line 46... | ||
46 | byte native_http=0; |
46 | byte native_http=1; |
47 | 47 | ||
48 | proc_info Form; |
48 | proc_info Form; |
Line 185... | Line 185... | ||
185 | 185 | ||
186 | $pop EAX |
186 | $pop EAX |
187 | if (EAX == 0) { |
187 | if (EAX == 0) { |
188 | ESI = http_transfer; |
188 | ESI = http_transfer; |
189 | // Handle redirects |
189 | // Handle redirects |
- | 190 | if (ESI.http_msg.status >= 300) && (ESI.http_msg.status < 400) |
|
190 | if (ESI.http_msg.status >= 300) && (ESI.http_msg.status < 400) { |
191 | { |
191 | redirected++; |
192 | redirected++; |
- | 193 | if (redirected<=5) |
|
192 | if (redirected<=5) { |
194 | { |
193 | http_find_header_field stdcall (http_transfer, #str_location); |
195 | http_find_header_field stdcall (http_transfer, #str_location); |
194 | if (EAX!=0) { |
196 | if (EAX!=0) { |
195 | ESI = EAX; |
197 | ESI = EAX; |
196 | EDI = #URL; |
198 | EDI = #URL; |
197 | do { |
199 | do { |
198 | $lodsb; |
200 | $lodsb; |
199 | $stosb; |
201 | $stosb; |
200 | } while (AL != 0) && (AL != 13) && (AL != 10)); |
202 | } while (AL != 0) && (AL != 13) && (AL != 10)); |
201 | DSBYTE[EDI-1]='\0'; |
203 | DSBYTE[EDI-1]='\0'; |
- | 204 | } |
|
202 | } |
205 | } |
- | 206 | else |
|
203 | } else { |
207 | { |
204 | //TODO: display error (too many redirects) |
208 | //TODO: display error (too many redirects) |
- | 209 | } |
|
205 | } |
210 | } |
- | 211 | else |
|
206 | } else { |
212 | { |
207 | redirected = 0; |
213 | redirected = 0; |
208 | } |
214 | } |
209 | // Loading the page is complete, free resources |
215 | // Loading the page is complete, free resources |
210 | http_free stdcall (http_transfer); |
216 | http_free stdcall (http_transfer); |
211 | http_transfer=0; |
217 | http_transfer=0; |
- | 218 | if (redirected>0) |
|
212 | if (redirected>0) { |
219 | { |
213 | WB1.GetNewUrl(); |
220 | WB1.GetNewUrl(); |
- | 221 | strcpy(#editURL, #URL); |
|
214 | strcpy(#editURL, #URL); |
222 | BrowserHistory.current--; |
- | 223 | OpenPage(); |
|
215 | OpenPage(); |
224 | } |
- | 225 | else |
|
216 | } else { |
226 | { |
217 | Draw_Window(); // stop button => refresh button |
227 | Draw_Window(); // stop button => refresh button |
218 | } |
228 | } |
219 | } |
229 | } |
220 | } |
230 | } |