Again new HTTPSocket is driving me nuts

It costs me another half a day to find out that xojo.net.HTTPSocket.ClearRequestHeaders leads to different results if used under OS X or WINDOWS.
Running my code under OS X works fine, but the same code run under Windows (even compiled there) leads to an error 500 (HTTP), with no further info.
Don’t made a protocol analysis this time, because I’m not used to appropriate tools under windows. But when I remove ClearRequestHeaders, which could be necessary reusing the same HTTPSocket instance several times, it suddenly runs.

xojo.net.HTTPSocket.ClearRequestHeaders gives me really a hard time. So many implicit and undocumented features! For Your convenience (coming from old HTTPSocket), the new HTTPSocket has:

  • no synchronous calls with timeouts
  • sending cookies along with a next request (if the first has set one) without asking
  • cookies seem to be taken from the standard browser on client site (WTF)
  • better don’t use ClearRequestHeaders() under Windows
    This is for Xojo 2016 r1.1

Xojo team I’m really angry about your xojo.net.HTTPSocket, it’s a mess concerning usability and documentation. Nevertheless it seems to work.

HTTP 500 is Internal Server Error, which is not your error.

It is also a very good thing that there are no synchronous requests. I am guilty of it, synchronous requests are just lazy and lock up the interface which is a very poor experience for the end user. (not that I’m going to full out implement events for a quick test.)

Can you make your ClearRequestHeaders issue happen with other websites?

If you don’t need HTTP 1.1, the classic socket is just fine.

In particular under Windows, Xojo.net.HTTPSocket is not quite ready for prime time IMHO.

One can argue a lot about this …
You ever had the need to rewrite code which uses synchronous calls previously? This takes me now 5 weeks for three apps and I’m not payed for this! Only because you no longer support the old HTTPSecureSocket, which lacks SNI !
I’m just analyzing ClearRequestHeaders …

[quote=317583:@Michel Bujardet]If you don’t need HTTP 1.1, the classic socket is just fine.

In particular under Windows, Xojo.net.HTTPSocket is not quite ready for prime time IMHO.[/quote]
Sorry, no!
The old HTTPSecureSocket doesn’t support SNI (server name indication).

New Obstacles:
If an app ever receives a cookie, Xojo.net.HTTPSocket is sending this cookie back to the server. It makes no difference if you create a new instance of Xojo.net.HTTPSocket or call ClearRequestHeaders. The cookie isn’t sent, if you restart the app.
This is true for MacOS X and Xojo 2016 r1.1.
Under windows no cookies are sent automatically !!! W.T.F.

ClearRequestHeaders should clear the cookie, because cookies are sent in the request header.

All this rant seems to call for bug reports, does it not ?

Ignoring this thread now. Enough negativity.

[quote=317675:@Michel Bujardet]All this rant seems to call for bug reports, does it not ?

Ignoring this thread now. Enough negativity.[/quote]

Well, sorry! But I’m really frustrated. Running from one problem into the next for 5 weeks now …

Regardless, Michel is correct. File bug reports for this stuff and we’ll get them fixed.

Thanx. I just did it (47112 and 47113). But “bugs” are only half the story …