Re: [Cppcms-users] 404 not found with valid URL and POST Request
Brought to you by:
artyom-beilis
|
From: SIMON A. <All...@su...> - 2013-03-11 03:26:03
|
Hello Actually that's the one with only \n which is working (though as you said it's supposed to be the \r\n which should work), maybe my previous mail wasn't clear. Note that the echo here is only to make simpler to see/test , I'm actually using python and httplib, and I've dumped the request using set_debuglevel Regards, Allan SIMON Tatoeba Administrator (Sysko) ________________________________ De : Artyom Beilis [art...@ya...] Envoyé : dimanche 10 mars 2013 20:18 À : cpp...@li... Objet : Re: [Cppcms-users] 404 not found with valid URL and POST Request HTTP requires that the headers are separated with CR/LF i.e. \r\n. The request that uses "\n" only is not an HTTP request, also many web servers accept it as well. Internal CppCMS web server designed mostly for embedded applications and debugging and requires confirming headers. Also note that in echo you can't path "\r\n" the way you do :-) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ________________________________ From: SIMON Allan <All...@su...> To: "cpp...@li..." <cpp...@li...> Sent: Sunday, March 10, 2013 8:55 PM Subject: [Cppcms-users] 404 not found with valid URL and POST Request Hello When I try to test my code with the embedded http server (there's no problem when using the FastCGI interface) the following request fail echo 'POST /users/register-new_treat HTTP/1.1\r\nHost: en.tatolocal:8080\r\nAccept-Encoding: identity\r\nContent-Length: 13\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nusername=toto' | nc en.tatolocal 8080 but if I remove the \r just before ContentLength, it works correctly echo 'POST /users/register-new_treat HTTP/1.1\r\nHost: en.tatolocal:8080\r\nAccept-Encoding: identity\nContent-Length: 13\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nusername=toto' | nc en.tatolocal 8080 I suppose it's certainly a little problem in the code which is parsing the HTTP request ? Regards, Allan SIMON Tatoeba Administrator (Sysko) ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Cppcms-users mailing list Cpp...@li...<mailto:Cpp...@li...> https://lists.sourceforge.net/lists/listinfo/cppcms-users |