Вниз
Скачать: CL | DM;

Как достать запрашиваемый URL из GET (http) ?   Найти похожие ветки 

← →
Makhanev Alexander   (2007-06-18 14:52) [0]

у меня есть вся команда GET,
требуется получить запрашиваемый браузером URL.

я так понял, что надо совместить то что лежит в HOST с тем что указано в GET.

свой парсер написать не проблема, но вдруг я упущу какие-то случаи...

поэтому, буду рад, если кто даст линк\код готового парсера http команды get который мне вернет url.


← →
Орион ©   (2007-06-18 15:16) [1]

 TDemiurgeCommandParser = class
 private
   FText,
   FURI,
   FProtoVersion,
   FCommand: string;
   function GetText: string;
   procedure SetText(const Value: string);
 public
   constructor Create(ACommandText: string);
   property Command: string read FCommand write FCommand;
   property URI: string read FURI write FURI;
   property ProtoVersion: string read FProtoVersion write FProtoVersion;
   property Text: string read GetText write SetText;
 end;

{ TDemiurgeCommandParser }

constructor TDemiurgeCommandParser.Create(ACommandText: string);
begin
 inherited Create;
 Text:=ACommandText;
end;

function TDemiurgeCommandParser.GetText: string;
begin
 Result:=FCommand+" "+FURI+" "+FProtoVersion;
end;

procedure TDemiurgeCommandParser.SetText(const Value: string);
var
 CommandText: string;

 function Extract(var AText: string): string;
 begin
   Result:=Fetch(AText, " ");
   AText:=TrimLeft(AText);
 end;

begin
 FText:=Value;
 CommandText:=Value;
 FCommand:=Extract(CommandText);
 FURI:=Extract(CommandText);
 FProtoVersion:=CommandText;
end;



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

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.014 c
15-1202400651
AntonUSAnoV
2008-02-07 19:10
2008.03.16
Проблема со сторонним компонентом


2-1201868147
S@shka
2008-02-01 15:15
2008.03.16
Привязка формы к окну другого приложения (Form1.Parent - ??)


15-1202164442
bara-igor
2008-02-05 01:34
2008.03.16
delphi 10 lite


15-1202286490
Fredy314
2008-02-06 11:28
2008.03.16
Балансирование трафика


6-1182162320
vishnia
2007-06-18 14:25
2008.03.16
Загрузка файла с компа пользователя на сервер




   Наверх