webapp calling a webapp handleSpecialUrl with HTTPSocket- dies?

webapp calling a webapp handleSpecialUrl with HTTPSocket- dies?

Hi Guys
I have battled with this all weekend and I must not understand how web server xoxo cgi webapps work?

I have 2 webapps located at 1701 with Phillip.

One is a emailserver that polls a DB of entries. If another app wants to send an email it posts an insert to the DB.
and then runs the code below. This hits the code in the handleSpecialUrl.

This wakes up the web app to poll the DB and look at the new entry and do its thing…

This all works well if the web app calling the emailserver is running on my desktop.

When I upload the web app to 1701 (in the same location) and run it dies.
i.e. The calling web app dies when running the code below?

Please what am I missing here?

Regards James

try
Dim socket1 As New HTTPSocket

Dim data As String = socket1.Get("http://XXX.XX.169.114/cgi-bin/ES1/es1.cgi/special/mailme", 30)

end try

Is the second app actually starting? If they have the same application identifier than the second one won’t be able to start.

As far as dying how do you know? In your example the request should process or no later than 30 seconds throw an error of some kind.

Hi phillip
They have different app Ids, and both start.
Both have a single webpage.
so I start the emailapps url.

Then I start the calling app.

It has an textbox to enter the email address.
And a button to action my method.

The method first inserts the record into the DB.
If I just leave it a that all is fine.

But when I try and call the emailapps handleSpecialUrl method, with the HTTPSocket it dies.
Its only when I call this that it dies.

I know it dies because the page Im on closes and it comes up with the application has gone offline message

i just found this in the docs
HTTPSocket is not yet compatible with Web Apps.
Usage on Linux requires libsoup 2.4.

but thats for the new framework I think.

[quote=245649:@James Nicholson-Plank]i just found this in the docs
HTTPSocket is not yet compatible with Web Apps.
Usage on Linux requires libsoup 2.4.

but thats for the new framework I think.[/quote]
That’s new framework. The old framework absolutely works.

Everything works as it should. The programmer was at fault.

A red hearing was everything worked in the ide but failed on the server. It ended up being (I think) running 2 cubesql server instances at the same time. Didn’t realise I was doing it. Long story short . There is no problem

Thanks Greg and Phillip

Xojo.net.httpsockets sometimes cause applications to quit if you are using glibc 2.17 instead of the glibc-2.14 required by Xojo. It’s a real pain!

More details
https://forum.xojo.com/41948-http-socket-crashes-webserver

Please make sure a bug report gets filed in Feedback.