Re: [Cppcms-users] 502 Bad Gateway after Xhr posting plain text and some more questions
Brought to you by:
artyom-beilis
|
From: Artyom <art...@ya...> - 2010-04-30 12:40:37
|
Hello,
> Hi Artyom,
>
> I tried your chat example with dojo and it works.
> However, when I send plain text from dojo
> and not form post with form=some text i get "502 Bad
> Gateway" error.
Ok, indeed there was an issue - I didn't written any response for POST.
Actually the response was empty. Fixed in hello_world.cpp in trunk.
I had to notice an application that output completed (if I do not
write anything...)
So just run svn update.
>
> here is the post request:
>
> Host localhost:8080
> User-Agent Mozilla/5.0 (X11; U; Linux
> i686; en-US; rv:1.9.2.3)
> Gecko/20100407 Ubuntu/9.10 (karmic) Firefox/3.6.3
> Accept
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language en,bg;q=0.7,en-us;q=0.3
> Accept-Encoding gzip,deflate
> Accept-Charset
> ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive 115
> Connection keep-alive
> Content-Type
> application/x-www-form-urlencoded;charset=utf-8
> Referer http://localhost:8080/hello_world/chat
> Content-Length 7
> Cookie test=1270049271
>
> here is the content "sssssss"
>
Few notes:
1st you need to send POST request in form message=ssssss (meaning
it expects "Form" behavior"
>
> Also, sometimes when i click multiple times on my test
> cppcms
> application, I get "Segmentation Fault" and my cppcms
> application
> stops?
Can you bring me the backtrace of segmentation fault?
You can do it with GDB
gdb your_app
> r
Crashes
> bt
>
> Another problem is that I can't make the session work even
> from your
> hello_world example. It always refreshes the time?
Do you have any session backend defined?
Give me the content of "session" object of the configuration?
At least default build of hello world - going to
http://localhost:8080/hello/session
Make sure you are using latest CppCMS version.
Also check if make test passes all tests, if not which one fail?
>
> Greetings,
> Stanimir
>
>
Best,
Artyom
|