Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 27 OCT 2008 05:36:47PM Paxton Scott wrote:

Greetings!

I converted my app to use oecgi2. Work great.

Except had one failure.

I have determined that oecgi2 appends a non-printing character to the end of the returned string.

I do not know what this character is yet. Using Javascript, I can count the length of the string, and look at each character in the string according to its position and all is as expected except there is one non-printing character at the end. This was discovered, because this is a return from an 'AJAX' call and the returned string is concatenated to form a url. Using the created url breaks my program. to prove, I added a character to the end of the returned string, then using charAT() looked at each character, and there is a non-printing character between the visible end of the string and my single concatenated character.

This does not seem right to me. (oecgi does not do this)

Paxton


At 27 OCT 2008 06:14PM Paxton Scott wrote:

And the trailing character is…drum roll… ASCII 0 as determined by

alert(xmldatapath.charCodeAt(xmldatapath.length-1));

maybe oecgi2 could be modified to not return this trailing character, so I don't have to?

Paxton


At 28 OCT 2008 07:58AM Bob Carten wrote:

Hi Paxton,

I have seen that problem. It seems to occur when you retrun non-html content. There is a workaround. If you are not returning html, add Content-Type and Content-Len headers, something like:

xml=….'

response =Content-Type: text/xml' : crlf$

response := 'Content-Length: ': len(xml) : crlf$

response := crlf$

response := xml

return response


At 28 OCT 2008 10:51AM Paxton Scott wrote:

Hi, Bob

Thanks for the response and work around. In working with php, returning HTML,I think I see the same thing, so suspecting it is coming from OEngineServer. You can probably easily verify that.

I have many many requests/replies, all mixed as to html or not.

I may be able to put some code in my inet_dce to trap the 'non-html' replies and add the work around.

Really appreciate your attention!

Have fun,

Paxton

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/18fcc15430824329852574ef0076b99f.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1