login about faq

Hi,

I'm using the latest C# x64 HttpClient 9.5.0.64. After sending POST request I'm reciving 303 redirect. Chilkat follows this redirect but the FinalRedirectUrl is empty (also WasRedirected is false)

---- Received ----
HTTP/1.1 303 See other
Date: Sat, 19 Nov 2016 22:21:07 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Location: http://www.xxx.com/samplepage
Server: Apache/2

---- Sending ----
GET http://www.xxx.com/samplepage HTTP/1.1
Referer: http://www.xxx.com/samplepage1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Cookie: 26ff1c4cf8034b8d6fbfabd99c91a505=1e519806c70318a5a3dffe0d1fc98d88
Host: www.xxx.com

asked Nov 19 '16 at 17:28

ekapek's gravatar image

ekapek
26559


Thanks. I'd need to see the contents of the verbose LastErrorText for the method call that sends the POST. (For verbose, set the VerboseLogging property = true.)

link

answered Nov 21 '16 at 09:56

chilkat's gravatar image

chilkat ♦♦
12.8k317367481

After more investigation I have noticed that the problem is another. When I've send POST request and then recive 303 header chilkat redirects to new location and resends all POST data as GET requests. That page recives it and doing action one more time sends 303 one more time, chilkat redirect to new location with POST data as GET... and again and again until reaches max redirects. Chilkat finish at 303 page and FinalRedirectUrl is empty.

So for conclusion - after POST and reciving redirect chilkat should follow Location but don't send that data again? It is like browsers work - they send data and than doing simple GET request wihout data. At the moment I'm cleaning HttpRequest with OnRedirect method - but maybe this will be changed in chilkat?

link

answered Nov 21 '16 at 10:18

ekapek's gravatar image

ekapek
26559

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×203

Asked: Nov 19 '16 at 17:28

Seen: 533 times

Last updated: Nov 21 '16 at 10:18

powered by OSQA