Главная страница
    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.036 c
14-1098794537
Delphin
2004-10-26 16:42
2004.11.14
При переносе текста получаю "?? ???"


3-1097841291
alsov1
2004-10-15 15:54
2004.11.14
Почему не работает цикл forall


6-1094142820
masqito
2004-09-02 20:33
2004.11.14
NETBIOS и IP


3-1097618520
saNat
2004-10-13 02:02
2004.11.14
ADO и MS Access


4-1096889169
Антон
2004-10-04 15:26
2004.11.14
Выход из WindowsXP





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