Hi. I would try and log out req.headers["Content-Type"] and remove the
ParseFormBody option from HttpServerSettings.options
(settings.options &= ~HttpServerOption.ParseFormBody;). Then you can
also log the request body using req.bodyReader.readAll() and see what
mootools actually sends.

  • body (always look like this, with/without mootools & ajax, with/without settings.options &= ~HttpServerOption.ParseFormBody;):

returnTicket=true&classOfService=eco&departureAirport=PAR&arrivalAirport=ROM&departureDate.day=8&departureDate.monthYear=10-2012&returnDate.day=15&returnDate.monthYear=10-2012&adultCount=1&childCount=0&babyCount=0&flFormSubmit=Rechercher

  • params (empty)
  • query (empty)
  • cookie (empty)
  • form (empty)
  • header (see below ..)

The Content-Type should be "application/x-www-form-urlencoded" or
"multipart/form-data".

The header when i use mootools looks like this:

POST /recherche HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 255
Origin: http://localhost:8080
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: text/html, application/xml, text/xml, /
Referer: http://localhost:8080/chercher
Accept-Encoding: gzip,deflate,sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Whitout mootools, it look like this (this is the one who actually work):

POST /recherche HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 237
Cache-Control: max-age=0
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Referer: http://localhost:8080/chercher
Accept-Encoding: gzip,deflate,sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Hope this can help a bit :/