Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.11.14;
Скачать: CL | DM;

Вниз

Веб чат на дельфи, работа с Response   Найти похожие ветки 

 
Lex_! ©   (2004-08-23 12:39) [0]

procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
 Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
Var I:Integer;
begin
Response.Content:="<html><head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 1</title></head><body>";
Response.SendResponse;
For i:=1 to 30 do
begin
Response.Content:=IntToStr(I)+"</BR>";
Response.SendResponse;
end;
Response.Content:="</body></html>";
Response.SendResponse;
end;


вот такой код дает в CGI Stand Alone Executable при выполнении из консоли файл с содержанием:

<html><head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 1</title></head><body>1</BR>2</BR>3
</BR>4</BR>5</BR>6</BR>7</BR>
8</BR>9</BR>10</BR>11</BR>12</BR>
13</BR>14</BR>15</BR>16</BR>
17</BR>18</BR>19</BR>20</BR>
21</BR>22</BR>23</BR>24</BR>
25</BR>26</BR>27</BR>28</BR>
29</BR>30</body></html>


тоесть теоретически страница верна... ... вместо цикла можно использовать что угодно ... данные отсылать по мере необходимости....

Но ... реально при вызове из браузера получаеться вот что:

<html><head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 1</title></head><body>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

1</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

2</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

3</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

4</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

5</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

6</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

7</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

8</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 6
Content:

9</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

10</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

11</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

12</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

13</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

14</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

15</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

16</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

17</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

18</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

19</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

20</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

21</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

22</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

23</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

24</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

25</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

26</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

27</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

28</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

29</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 7
Content:

30</BR>Status: 200 OK
Content-Type: text/html
Content-Length: 14
Content:

</body></html>

никто не подскажет где косяк?... :(


 
Lex_! ©   (2004-08-26 06:30) [1]

И тишина, удалите топ хоть чтоль ...


 
deff   (2004-09-05 00:40) [2]

Response.Content:="<html><head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 1</title></head><body>";
For i:=1 to 30 do
begin
Response.Content:=Response.Content+IntToStr(I)+"</BR>";
end;
Response.Content:=Response.Content+"</body></html>";
Response.SendResponse;



Страницы: 1 вся ветка

Текущий архив: 2004.11.14;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.05 c
1-1099041836
Tom
2004-10-29 13:23
2004.11.14
Рисую на форме в Run Time...


14-1098390278
123
2004-10-22 00:24
2004.11.14
Кнут.


4-1095775745
VideoLord
2004-09-21 18:09
2004.11.14
Как программно залогинить пользователя


4-1096311805
SergeV
2004-09-27 23:03
2004.11.14
Загрузка процессора!


1-1099335963
dolphin
2004-11-01 22:06
2004.11.14
динамическое создание форм





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский