Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread webbroker server app freezes
Sat, Mar 1 2014 6:37 AMPermanent Link

Ronald

Hi,

I post forms to a webbroker server application that handles all my data. I
send the forms as a var-value list in a TServerRequest.RequestContent
instance. That works fine. Until I enter a diacritic character such as in
one of the fields. Then the form is not posted and the server application
freezes. I can see it "hang" in my taskmanager.
What could be the problem here?

Greetings,
Ronald
Sun, Mar 2 2014 10:25 AMPermanent Link

Ronald

If I HTTPEncode the values of the form before sending them to the server,
everything works fine. The only thng is that for example the character is
saved in my DBISamTable as é. That must be the unicode issue I presume.


"Ronald"  schreef in bericht
news:2302FB0D-6070-40A2-AA03-86EDAB0E6713@news.elevatesoft.com...

Hi,

I post forms to a webbroker server application that handles all my data. I
send the forms as a var-value list in a TServerRequest.RequestContent
instance. That works fine. Until I enter a diacritic character such as in
one of the fields. Then the form is not posted and the server application
freezes. I can see it "hang" in my taskmanager.
What could be the problem here?

Greetings,
Ronald
Mon, Mar 3 2014 4:55 AMPermanent Link

Matthew Jones

It is likely that you are using Indy in your server, and I found that I had to
modify the code. The full thread is findable by searching for uROIndyHTTPServer but
I've copied my change below.

Basically, I found that the character set had to be set to utf-8 to make sense. You
can use something like Chrome's F12 to see the headers and everything. I would
suspect that the UTF8 is being mis-interpreted in your system somewhere. Of course
DBISAM may do odd stuff with UTF8, but I use it too and haven't had a problem yet.

/Matthew Jones/

> *Subject:* Re: Unusual characters
> *From:* matthew@matthew-jones.com (Matthew Jones)
> *Date:* Mon, 13 May 2013 10:24 +0100 (BST)
>
> Okay, the uROIndyHTTPServer file, at about line 250 has a test:
>
>   if SameText(lContentType, 'text/xml') then
>     lContentType := lContentType + '; charset=utf-8';
>
> If I remove the test and put that on always, I get the proper TM
> symbol. I shall
> work out what the proper test should be - probably it should be
> looking for "text/"
> of any type - don't want to mess up binary.
>
> /Matthew Jones/
>
Tue, Mar 4 2014 8:41 AMPermanent Link

Ronald

Hi Matthew,

I don't use Indy as a server. I use IIS. I have tried suggestion by with the
contenttype utf-8, but that does work either. By the way, if I save the form
httpencode (I encode all the fomvalues) and I read it back in a grid, it
shows the correct characters. I am always a bit in the mist concerning
utf-8. IIS also accepts my formvalues if I do not give the contenttype.
Maybe IIS is quite forgiving and it fills in the "blanks".  I would prefer a
good error message. I also do not know whataction the server takes when it
receives met request.

The posting with a Serverrequest works very well for me, because I recieve a
statuscode back. If a use TFom.Submit I can onbly get feedback in a TPage
and that does not work form me.

Your exncryption routines work fine, I use them to encrypt cookies.

Thanks,
Ronald


"Matthew Jones"  schreef in bericht
news:memo.20140303095533.6848V@nothanks.nothanks.co.uk...

It is likely that you are using Indy in your server, and I found that I had
to
modify the code. The full thread is findable by searching for
uROIndyHTTPServer but
I've copied my change below.

Basically, I found that the character set had to be set to utf-8 to make
sense. You
can use something like Chrome's F12 to see the headers and everything. I
would
suspect that the UTF8 is being mis-interpreted in your system somewhere. Of
course
DBISAM may do odd stuff with UTF8, but I use it too and haven't had a
problem yet.

/Matthew Jones/

> *Subject:* Re: Unusual characters
> *From:* matthew@matthew-jones.com (Matthew Jones)
> *Date:* Mon, 13 May 2013 10:24 +0100 (BST)
>
> Okay, the uROIndyHTTPServer file, at about line 250 has a test:
>
>   if SameText(lContentType, 'text/xml') then
>     lContentType := lContentType + '; charset=utf-8';
>
> If I remove the test and put that on always, I get the proper TM
> symbol. I shall
> work out what the proper test should be - probably it should be
> looking for "text/"
> of any type - don't want to mess up binary.
>
> /Matthew Jones/
>
Tue, Mar 11 2014 8:40 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< If I HTTPEncode the values of the form before sending them to the server,
everything works fine. The only thng is that for example the character is
saved in my DBISamTable as é. That must be the unicode issue I presume. >>

Did you run your ISAPI DLL in the debugger to see how those values are
coming into the back-end ?  Also, did you specify the content type/encoding
in your EWB server request ?

Tim Young
Elevate Software
www.elevatesoft.com
Image