AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Clac CRC before downloading
Thema durchsuchen
Ansicht
Themen-Optionen

Clac CRC before downloading

Ein Thema von sdean · begonnen am 19. Apr 2010 · letzter Beitrag vom 19. Apr 2010
Antwort Antwort
Seite 2 von 2     12   
generic

Registriert seit: 24. Mär 2004
Ort: bei Hannover
2.415 Beiträge
 
Delphi XE5 Professional
 
#11

Re: Clac CRC before downloading

  Alt 19. Apr 2010, 16:45
Look here:
http://en.wikipedia.org/wiki/HTTP_ETag
the german one is better:
http://de.wikipedia.org/wiki/HTTP_ETag
and
http://solariz.de/2044/etag_webseite...chleunigen.htm

Depending on the Webserver you have a strong Etag or not.
Strong ETags using checksums.
Weak ETags you can detect on "W/" before the Etag-Code.
last link uses php code for MD5-Etaging

Delphi-Quellcode:
uses
  MSXML2_TLB;

var
  req : IXMLHTTPRequest;
  str_link: string;
begin
  req := CoXMLHTTP40.Create;
  str_link:='http://linktofile';
  req.Open('HEAD', str_link, False, EmptyParam, EmptyParam);
  req.send(EmptyParam);
  // check for req.status=200 -> if true no error
  MessageDlg(req.getAllResponseHeaders(), mtWarning, [mbOK], 0);
  MessageDlg(req.getResponseHeader('Etag'), mtWarning, [mbOK], 0);

  req:=nil;
end;

the headers may look like:
Code:
Date   Mon, 19 Apr 2010 15:45:57 GMT
Server   Apache
Pragma   public
Expires   Mon, 19 Apr 2010 16:34:07 GMT
Last-Modified   Mon, 19 Apr 2010 15:34:07 GMT
Cache-Control   max-age=2890, public, must-revalidate, proxy-revalidate Vary   Accept-Encoding,Cookie,User-Agent
Etag   7e828ab2622e112d6a6bd3b7083a560b
Content-Encoding   gzip
Content-Type   text/html; charset=UTF-8
Coding BOTT - Video Tutorials rund um das Programmieren - https://www.youtube.com/@codingbott
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#12

Re: Clac CRC before downloading

  Alt 19. Apr 2010, 17:06
@sdean: please dont push within 24 hours. If you want to add any information during this time, you can use the edit-button at the top of your last entry.
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
sdean

Registriert seit: 5. Dez 2009
64 Beiträge
 
#13

Re: Clac CRC before downloading

  Alt 19. Apr 2010, 17:24
@SirThornberry : Sorry for that
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:44 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz