URLConnection fiasco

I can’t believe that URLConnection made it through testing for 2018r4. It’s totally useless on Windows. However, so are the other options for HTTP 1.1 access which are all failing on Windows.

URLConnection.SendSync isn’t synchronous. And the class just causes StackOverflow exceptions if you use it to retrieve anything non-trivial. I’m stymied. My users are bleating. I’ve just wasted 12 hours trying ever more arcane ways of bypassing the bugs, to no avail.

I’d have thought Xojo would’ve raced to release 2018r4.1 to make this less embarrassing.

[quote=423257:@Paul Rodman]I can’t believe that URLConnection made it through testing for 2018r4. It’s totally useless on Windows. However, so are the other options for HTTP 1.1 access which are all failing on Windows.

URLConnection.SendSync isn’t synchronous. And the class just causes StackOverflow exceptions if you use it to retrieve anything non-trivial. I’m stymied. My users are bleating. I’ve just wasted 12 hours trying ever more arcane ways of bypassing the bugs, to no avail.

I’d have thought Xojo would’ve raced to release 2018r4.1 to make this less embarrassing.[/quote]
I feel like they’d have a lot more luck if URLConnection were backed by a common cURL library, rather than linking against system-specific stuff. That way behavior would be pretty consistent, and from what I can tell, cURL is much nicer than WinHTTP.

But in my real-world projects, I have to use a wrapper class that uses Xojo.Net.HTTPSocket on Mac and classic HTTPSecureSocket on Windows. I was hoping URLConnection would solve that, but as you’ve seen, it’s not ready for production.

I am recently started to use URLConnection. Do you have Feedback Requests with sample Projects we cant test?
Thank you.

You can use CURL classes with MBS Xojo CURL Plugin.

We do have CURLSMBS with embedded library for OpenSSL and SSH and you can load your own root certificates or those from keychain (Mac) or Windows certificate store.

Or you use CURLNMBS class, which uses native SSL on Mac and Windows.

And we have CURLMBS, which allows you to bring your own CURL Library.

A Xojo update needs to be treated like an update to your app. I usually use the latest version of Xojo when starting a new version and then I DON’T update when there is a new version of Xojo.

Until 19R4 I was happily using Xojo.Net.HTTPSocket on Windows and as a pre-release tester I did test URLConnection without issues in my asynchronous environment.

I didn’t test and can’t really be bothered with the sendsync method as it seems to be against the event driven environment that is Xojo.

@Paul Rodman how did you go testing the betas?

I can’t talk about the specific dates, how quickly issues were reported and how little time testers had between final beta and release to really test things as this isn’t the pre-release section of the forum. I don’t think I talked about anything there, right :shiftyeyes:

[quote=423261:@Sascha S]I am recently started to use URLConnection. Do you have Feedback Requests with sample Projects we cant test?
Thank you.[/quote]

<https://xojo.com/issue/54410>

Don’t use it yet.

Event driven != asynchronous

Almost the entire framework is synchronous

Console Apps aren’t intrinsically event-driven.

Yeh, I did something similar, but hadn’t gotten around to trying HTTPSecureSocket yet. Is that HTTP 1.1 compatible?

Sadly I can’t afford/justify your plugins.

I have neither the time nor the incentive to do Xojo’s work for them, especially at their licensing prices. Also, as I recall, URLConnection was a last minute addition to 2018r4.

I just don’t understand why they haven’t released 2018r4.1 to fix the most egregious issues.

HTTPSocket and HTTPSecureSocket are both HTTP 1.0
I think there’s a third party blog post floating around for how to fake the headers if absolutely necessary.

Unfortunately the “HTTP/1.1” part of the protocol is not a header.

URLConnection has been widely noted as not working as prescribed, in beta and outside of it.

The most egregious aspect of its release is the fact that so many complaints from me on my blog, and others here, were related to having 3 different ways to use HTTP and all of them terrible. Now they have hastily released a 4th way and it is still terrible.

Phillip and I have been discussing my improper terminology, but whatever kind of hack it was I remember it working.
I did stumble across https://github.com/charonn0/RB-libcURL in my attempts to re-find the blog post.

[quote=423264:@Christian Schmitz]You can use CURL classes with MBS Xojo CURL Plugin.

We do have CURLSMBS with embedded library for OpenSSL and SSH and you can load your own root certificates or those from keychain (Mac) or Windows certificate store.

Or you use CURLNMBS class, which uses native SSL on Mac and Windows.

And we have CURLMBS, which allows you to bring your own CURL Library.[/quote]

I see I can buy the CURL plugin separately from the $300 offering. If I did so, do I need to buy anything else?

[quote=423329:@Phillip Zedalis]Unfortunately the “HTTP/1.1” part of the protocol is not a header.

URLConnection has been widely noted as not working as prescribed, in beta and outside of it.

The most egregious aspect of its release is the fact that so many complaints from me on my blog, and others here, were related to having 3 different ways to use HTTP and all of them terrible. Now they have hastily released a 4th way and it is still terrible.[/quote]

Please keep in mind that blog posts & posts on the forums are not bug reports.

[quote=423327:@Paul Rodman]I have neither the time nor the incentive to do Xojo’s work for them, especially at their licensing prices. Also, as I recall, URLConnection was a last minute addition to 2018r4.

I just don’t understand why they haven’t released 2018r4.1 to fix the most egregious issues.[/quote]

You have a good comment there. Having major issues of xojo.net.httpsocket being broken (post) and urlconnection has flaws. They seem to be fixed in feedback but still no release…