Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Indy HTTPServer + Basic Authentication in SVN Version kaputt (https://www.delphipraxis.net/150432-indy-httpserver-basic-authentication-svn-version-kaputt.html)

paresy 16. Apr 2010 11:39


Indy HTTPServer + Basic Authentication in SVN Version kaputt
 
r4177, Delphi 2007

Basic Authentication funktioniert nicht. Der Browser zeigt kein Fenster für Username/Passwort.

Problem: Durch den Rewrite der RawHeader Funktionen wird nun im Header ein Semikolon zu viel ausgegeben.

Jetzt (falsch):
Code:
WWW-Authenticate: Basic; realm="bla"
Vorher (richtig):
Code:
WWW-Authenticate: Basic realm="bla"
RFC: http://www.faqs.org/rfcs/rfc2617.html

Workaround: IdCustomHTTPServer.pas

Vorher:
Delphi-Quellcode:
    if AuthRealm <> '' then begin
      Values['WWW-Authenticate'] := 'Basic';   {Do not Localize}
      Params['WWW-Authenticate', 'realm'] := AuthRealm;   {Do not Localize}
    end;
Naher:
Delphi-Quellcode:
    if AuthRealm <> '' then begin
      Values['WWW-Authenticate'] := 'Basic realm="'+AuthRealm+'"';   {Do not Localize}
    end;
paresy


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:31 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