WWW server reports error after POST Request by Internet Direct components in Delphi

I’m very sure that I’m POSTing the right data

Since it does not work – obviously you do not (or Delphi does not – that makes no difference for server).

You should start usual debugging loop:

  1. Observe reference working behaviour.
  2. Observe your program behavior
  3. Spot the difference
  4. Eliminate the difference
  5. Check if the program works now
  6. If not – go to step 2.

Reference implementation would be some WWW browser working with site: Opera, Chrome, Firefox, MS IE, etc.

  • Observing tool would be some HTTP Sniffer like WireShark or OmniPacket or Microsoft Net Monitor or else, however this tinkers with OS work on rather deep level.
  • Or it can be local proxy with GUI, like Proxomitron or Membrane Monitor – but that would require special setup for both the program and the browser, to route their traffic through that local proxy.

Then you should read about HTTP, starting with shallow observation at Wikipedia and then opening related RFC documents (specifications of different part of HTTP protocol) so that you would understand what do the observed differences mean and how to fix them. For example many people use POST request when they actually should use GET request or such.

You want to debug HTTP program but for this HTTP logs, workign and borken, are required and your question lacks them. More so, most probably you can fix it your self, just bring your program’s HTTP log to accordance with both RFCs theory and working browsers practice.

Leave a Comment