Problem with TResponse.SendRedirect lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- egsuh · 2024-10-23 11:17 In my webserver program, AResponse.SendRedirect does not always work. The target page is static page. The error message (from IIS) says, QuoteHTTP Error 405.0 - Method Not Allowed Page cannot be displayed as wrong method (HTTP verb) is being used. nginx says the same error. The static page itself is displayed without any problem. And SendRedirect is also done correctly when I directly put it in the ActionRequest --- only through GET method. It semms that after the web server has received something via POST method, then SendRedirect does not work. What should I check, and what could be solutions? ---------------------------------------------------------------------- rvk · 2024-10-23 11:31 I'm not sure what the problem is (you don't show much code). But TResponse.SendRedirect itself doesn't do much. It just sets the Location header to TargetURL and Code/CodeText to 307 or 302. That is send back to the client. What the client does with it... is up to the client. If the code is redirect/moved... maybe the client wants to do the POST to that new URL. Can your redirected URL (static page) handle POST ?? You could try to do a post to it via curl, just post some dummy data to that page. Next... what is actually the method you receive at that IIS and nginx server when you receive that error. (should be in the logs) ---------------------------------------------------------------------- egsuh · 2024-10-23 13:28 This is rather funny... I made a simple example. You may try this on: http://www.alphaq.biz/htmls/p121_002.htm Code: Text [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i