Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Problem mit idHTTP.Post (https://www.delphipraxis.net/213835-problem-mit-idhttp-post.html)

kuba 3. Okt 2023 15:02

Problem mit idHTTP.Post
 
Hallo,

in meinem Programm verwende ich folgende Programmzeile um einen Wert aus einer MySQL Datenbank zu lesen:

Code:
Response := IdHTTP1.Post(Manufacturer_URL+'/data/getpcid.php', data);
Wenn ich den Code mit Delphi XE7 übersetze funktioniert das einwandfrei.
Wenn ich den Code mit Delphi 11.2 (Alexandria) übersetze dann erhalte ich die Fehlermeldung Error HTTP 1.1 500 Internal Server Error.

Woran könnte das liegen ???

Olli73 3. Okt 2023 15:39

AW: Problem mit idHTTP.Post
 
Stimmt denn Request.ContentType, .Encoding etc.?

kuba 3. Okt 2023 16:56

AW: Problem mit idHTTP.Post
 
Zitat:

Zitat von Olli73 (Beitrag 1527646)
Stimmt denn Request.ContentType, .Encoding etc.?

Gibt es denn da einen Unterschied zwischen Delphi XE7 und 11.2 ?
Ich kompiliere ja dasselbe Projekt ...

Olli73 3. Okt 2023 17:04

AW: Problem mit idHTTP.Post
 
Wenn du dich auf die Default-Einstellungen verlässt, könnten die natürlich anders sein. Aber was konkretes weiß ich da nicht.

kuba 3. Okt 2023 17:10

AW: Problem mit idHTTP.Post
 
Ja, sind die Default Einstellungen.

Olli73 3. Okt 2023 17:14

AW: Problem mit idHTTP.Post
 
Die würde ich Mal (im Debugger) vergleichen...

Kas Ob. 3. Okt 2023 17:18

AW: Problem mit idHTTP.Post
 
Post is client side code, while "Error HTTP 1.1 500 Internal Server Error." is server side error report.

You should capture the traffic on both EXE and compare the headers, because 500 is serious error on server side, HTTP servers should not report 500 for simply malformed POST request, so what ever the reason i recommend to get to the bottom of it.

kuba 3. Okt 2023 17:28

AW: Problem mit idHTTP.Post
 
Ich habe jetzt folgende Zeilen davor gepackt. Gleiches Verhalten.

Code:
IdHTTP1.Request.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
IdHTTP1.Request.ContentType := 'text/html';
IdHTTP1.Request.ContentEncoding := 'utf-8';
Welche Parameter könnten noch in Frage kommen ? Im Objektinspector sind alle Einstellungen gleich.

Olli73 3. Okt 2023 17:33

AW: Problem mit idHTTP.Post
 
Benutzt du auch die gleiche Datenbank, d.h. "Data" ist immer gleich?

kuba 3. Okt 2023 17:38

AW: Problem mit idHTTP.Post
 
Zitat:

Zitat von Olli73 (Beitrag 1527655)
Benutzt du auch die gleiche Datenbank, d.h. "Data" ist immer gleich?

Alles identisch, nur die Delphi Version ist unterschiedlich.
Ich habe mir DATA mal anzeigen lassen und es gibt tatsächlich einen Unterschied, Seltsam eigentlich aber ich prüfe das jetzt nochmal.


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:16 Uhr.
Seite 1 von 2  1 2      

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