Using controller and POST forms

Feb 13, 2009 at 11:09 AM
Hello I use ControllerModule and my own controller (ModuleController) derived from ViewController. I implemented methods ModuleController.Test and ModuleController.Info which I use to create dynamic data for web pages. It works fine. But when I inserted post form infot my web page <form method="post" action="/module/info"> method ModuleController.Info was not called. I inserted breakpoint into HttpClientContextImp and I saw received string POST /module/info... But HttpClientContextImp wanted to read more data from the stream, but it has all data from client and  no new data received and connection was closed. Do you have some example how to process POST forms? Is not there a bug?

Best regards
Myth
Coordinator
Feb 13, 2009 at 11:39 AM
Does your controller work with get?

HttpClientContextImp will always read if HTTP v1.1 is used and keep-alive is active (which is default)
Feb 13, 2009 at 12:09 PM
Yes with get controller works fine.
Coordinator
Feb 13, 2009 at 12:11 PM
Can you post the complete POST request here? With headers and body.
Feb 13, 2009 at 12:24 PM
POST /module/info HTTP/1.1
Host: 127.0.0.1:8180
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: cs,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://127.0.0.1:8180/module/info/Rsd/execute/Skip?downloader=Prime
Content-Type: application/x-www-form-urlencoded
Content-Length: 13

data=TestData
Feb 13, 2009 at 1:11 PM
I have same issues when making a POST with body data, specially with large bodies.

I have submitted a bug with patch that works for my case: http://www.codeplex.com/webserver/WorkItem/View.aspx?WorkItemId=3735

Coordinator
Feb 24, 2009 at 9:53 AM
try again with the latest revision.