Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

HTTP Answer, Different Cookie info in Delphi 6 and Delphi 10.2

$
0
0

Hello,

I have to update a Delphi 6 web Application (TDWAWebModule) to Delphi 10.2. Nearly anything works fine, except one function.

On a web page is a button, where on can start a PHP script. This script has to access a cookie. But this cookie is not available in the script.

The request header are identical for both Delphi versions (except the changeable part of cookie names):

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: de,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Content-Length: 606
Content-Type: application/x-www-form-urlencoded
Cookie: SID-64A8D6A87A91F8ED=1219E41D7661B3381CC9183E0E1319A5
Host: localhost
Referer: http://localhost/IERF/Interneterfassung.exe/entry
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:59.0) Gecko/20100101 Firefox/59.0

But the answer is different in one line (here the answer from Delphi 6):

HTTP/1.1 200 OK
Content:
Content-Length: 57975
Content-Type: text/html
Date: Tue, 20 Mar 2018 15:49:40 GMT
Server: Microsoft-IIS/7.5
Set-Cookie: SID-64A8D6A87A91F8ED=12F296381EC6DF3E19E374A548438486; expires=Thu, 19 Apr 2018 16:49:40 GMT
Set-Cookie: PHP-64A8D6A87A91F8ED=12F296381EC6DF3E19E374A548438486; path=/IERF/PHP/; expires=Thu, 19 Apr 2018 16:49:40 GMT
X-Powered-By: ASP.NET

The answer from the Delphi 10.2:

HTTP/1.1 200 OK
Content:
Content-Length: 56713
Content-Type: text/html
Date: Tue, 20 Mar 2018 15:41:04 GMT
Server: Microsoft-IIS/7.5
Set-Cookie: SID-209198B606F8B9BD=2DC149C157BDB78C003BAF823616DB19; expires=Thu, 19 Apr 2018 16:41:04 GMT
Set-Cookie: PHP-209198B606F8B9BD=2DC149C157BDB78C003BAF823616DB19; path=http://localhost/IERF/PHP/DUVAPDF.php; expires=Thu, 19 Apr 2018 16:41:04 GMT
X-Powered-By: ASP.NET

As you will notice the different is the path value of the second cookie. While I have made no changes inside the code, this must be a change inside the component.

What is to do to get the old behavior in Delphi 10.2?

Thanks in advance.

Jürgen Modic


Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>