Вниз
Скачать: 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.026 c
2-1203124294
DJ_UZer
2008-02-16 04:11
2008.03.16
Цвет текста


3-1193041148
kyn66
2007-10-22 12:19
2008.03.16
Связь Delphi - 1C


2-1203330143
AlexAA
2008-02-18 13:22
2008.03.16
Границы Memo


2-1202928676
savyhinst
2008-02-13 21:51
2008.03.16
HOWTO_ISAPI


11-1166215701
Galkov
2006-12-15 23:48
2008.03.16
про Align, когда выключена видимость родителей




   Наверх