NetTalk Central

Author Topic: Double POST when compiled with C9  (Read 2832 times)

JPMacDonald

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • Email
Double POST when compiled with C9
« on: November 09, 2013, 02:59:28 PM »
Hi Bruce,

I compiled an app used as a SOAP server using NT 7.28 with the latest C9 compiler and I get very odd results from the server. It looks like the incoming request happens twice, the first one is truncated and the second one seems complete but the data returned to the SOAP client is incorrect.

You can see this behaviour if you compile the example SOAP server (42) and Client apps. Hit the Get Info button for a student and you will see 2 POST to the server, the first one being truncated.

I am at a loss to explain it but it sure broke my SOAP server.

When you get a chance could you take a look.

Thanks

Parker

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Double POST when compiled with C9
« Reply #1 on: November 10, 2013, 10:23:14 PM »
Hi Parker,

the "double entry" in the log is normal, and expected, and has been there for a POST for quite some time.
It exists because for each incoming post, 2 items are sent to the log, the "header" (which appears when the POST arrives) and the Header and Footer which appears once the whole "post" has been received. Posts can be very big, and so the double log helps identify where very large posts are coming from. I think the Multi-Host (if I recall correctly) has a tab to show "incoming Posts in progress" which helps to understand how the server is being accessed for big posts.

So the "odd results from the server" are not caused by a double-post (there's only one post) and it's not caused by two Posts appearing in the log. So I guess tell us more about what makes the results odd, and we can go from there.

cheers
Bruce

JPMacDonald

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • Email
Re: Double POST when compiled with C9
« Reply #2 on: November 11, 2013, 10:04:08 AM »
Hi Bruce,

Seems I was caught by a multitude of upgrades and behaviour changes. Here is the story just to close the loop on the issue.

The current app's production environment is C8.0.9304/NT6.44/ ST1.54/XF2.33 in that environment there is only single POST in the log which lead me to cry wolf on that one.

Digging deeper into the new environment (C9.0.10376/NT 7.28/ST 1.92/XF2.4) I found that this line in my program was no longer parsing the SOAP envelope:

  Xml.Load(Request,xmlString,xmlLength)

I had to add this before it:

 xml.TagCase = XF:CaseAny

I was still having unexpected results and traced that to what I suspect is a change under the hood of the string theory JOIN method. I modified my code around that and now it seems to be functioning as before.

Can't say that was any fun   :-\

Regards

Parker