Главная страница
    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.033 c
14-1098196845
able
2004-10-19 18:40
2004.11.14
avi2scr &amp; scr поставить, как стандартный ScreenSaver


1-1098694044
Alibaba
2004-10-25 12:47
2004.11.14
TListBox


14-1098683811
syte_ser78
2004-10-25 09:56
2004.11.14
Подарок девушке


14-1098183034
Kerk
2004-10-19 14:50
2004.11.14
Орешник отдыхает.


1-1099403247
TSa
2004-11-02 16:47
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
Английский Французский Немецкий Итальянский Португальский Русский Испанский