Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2004.11.14;
Скачать: [xml.tar.bz2];

Вниз

Веб чат на дельфи, работа с 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;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.033 c
14-1098646074
Dimedrol
2004-10-24 23:27
2004.11.14
Блоки питания - 250W -vs- 400W


4-1096839798
Ded Moroz
2004-10-04 01:43
2004.11.14
Перехват


4-1097055635
3fc
2004-10-06 13:40
2004.11.14
Вывод текста под углом средствами WinAPI


9-1090532158
Sergeef
2004-07-23 01:35
2004.11.14
Доки по созданию игр на С++


6-1094132328
Dextor
2004-09-02 17:38
2004.11.14
Небольшая проблемка с процедурой вызванной из Dll на лок. тачке





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский