# URLConnection error 1200 ?

**URL:** <https://forum.xojo.com/t/urlconnection-error-1200/49371>\
**Category:** General\
**Created:** [July 14, 2019, 8:26pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371 "2019-07-14T20:26:16Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [July 16, 2019, 2:53pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/21 "2019-07-16T14:53:40Z")

</div>

@Hal Gumbert: AFAIK you do need to test per target. The errors aren’t even properly documented.

---

<div class="post-metadata">

**Author:** ![Geoff\_Perlman](https://forum.xojo.com/user_avatar/forum.xojo.com/geoff_perlman/32/48_2.png) [@Geoff\_Perlman](https://forum.xojo.com/u/Geoff_Perlman)\
**Post date:** [July 16, 2019, 3:02pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/22 "2019-07-16T15:02:02Z")

</div>

The perfect scenario is using native APIs but abstracting you from the platform specifics. I think URLConnection was rushed out the door a bit because of a bug in HTTPSocket (if memory serves) so there wasn’t time to sit down and make the connection errors platform-agnostic. However, as I mentioned yesterday, I’ve created a feature request to resolve this. It doesn’t seem like a difficult one to do. We won’t be able to cover every possible error as there will be some that are platform specific. A good example is on the Mac when you attempt to connect to an HTTP URL without the appropriate plist entry. However, we can cover a lot of them.

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [July 16, 2019, 3:04pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/23 "2019-07-16T15:04:53Z")

</div>

the enums for Windows & macOS error codes are on \<[https://xojo.com/issue/56384](https://xojo.com/issue/56384)\>

---

<div class="post-metadata">

**Author:** ![Geoff\_Perlman](https://forum.xojo.com/user_avatar/forum.xojo.com/geoff_perlman/32/48_2.png) [@Geoff\_Perlman](https://forum.xojo.com/u/Geoff_Perlman)\
**Post date:** [July 16, 2019, 3:06pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/24 "2019-07-16T15:06:44Z")

</div>

> [@445472:@Norman Palardy](#):
>
> the enums for Windows & macOS error codes are on \<[https://xojo.com/issue/56384](https://xojo.com/issue/56384)\>

Thanks Norman.

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [July 16, 2019, 3:35pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/25 "2019-07-16T15:35:49Z")

</div>

can someone please help me with showing how to install a info.plist file inside a xojo project ?  
a plist file dedicated to app transport security ?  
thanks.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [July 16, 2019, 3:37pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/26 "2019-07-16T15:37:33Z")

</div>

[quote=445479:@Jean-Yves Pochez]can someone please help me with showing how to install a info.plist file inside a xojo project ?  
a plist file dedicated to app transport security ?  
thanks.[/quote]  
Aren’t you supposed to put it as a build step somehow? Here’s a quick google result [https://blog.xojo.com/2014/07/14/adding-plist-settings-to-your-os-x-apps/](https://blog.xojo.com/2014/07/14/adding-plist-settings-to-your-os-x-apps/)

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [July 16, 2019, 3:53pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/27 "2019-07-16T15:53:53Z")

</div>

1. open a text editor
2. copy & paste in the code from [http://documentation.xojo.com/topics/communication/internet/using\_non-secure\_urls\_on\_macos\_and\_ios.html](http://documentation.xojo.com/topics/communication/internet/using_non-secure_urls_on_macos_and_ios.html)
3. save as “info.plist”
4. drag and drop into your project

its all in the docs already

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [July 16, 2019, 4:42pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/28 "2019-07-16T16:42:57Z")

</div>

[quote=445492:@Norman Palardy]1) open a text editor  
2) copy & paste in the code from [http://documentation.xojo.com/topics/communication/internet/using\_non-secure\_urls\_on\_macos\_and\_ios.html](http://documentation.xojo.com/topics/communication/internet/using_non-secure_urls_on_macos_and_ios.html)  
3) save as “info.plist”  
4) drag and drop into your project

its all in the docs already[/quote]  
I did that and it does not work  
the compiled app has a standard info.plist, and there is my info.plist in the resources folder of the app !

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [July 16, 2019, 6:27pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/29 "2019-07-16T18:27:39Z")

</div>

what version are you using ?  
mac, windows, linux ?

EDIT : dunno what else it might be as I just performed those steps using BBEDit to edit the text file then dragged it into a brand new desktop app in 2019r1.1  
and there’s the plist with my info added to it as I expected

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [July 16, 2019, 7:57pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/30 "2019-07-16T19:57:26Z")

</div>

xojo 2019r11 and macos 10.11.6

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [July 16, 2019, 9:15pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/31 "2019-07-16T21:15:58Z")

</div>

it’s finally ok ! I had to delete and redrag my info.plist file to the project, and now the app info.plist is ok  
and I don’t have the 1200 error anymore !

but  
I still have the “malformed web url” error when I hane an url with spaces in it.  
how can I fix this ?  
I already replaced the spaces with %20 but no luck still the error…

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [July 16, 2019, 9:32pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/32 "2019-07-16T21:32:38Z")

</div>

> [@445540:@Jean-Yves Pochez](#):
>
> I already replaced the spaces with %20 but no luck still the error…

You might need more than just the spaces taken care of: [EncodeURLComponent — Xojo documentation](http://documentation.xojo.com/api/text/encoding_text/encodeurlcomponent.html)

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [July 17, 2019, 6:43pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/33 "2019-07-17T18:43:20Z")

</div>

[quote=445458:@Hal Gumbert]That’s cool as long as we don’t need separate error testing per target.

Imagine not having SpecialFolder where you have to use a Case statement to test which target you are on to simply specify a path…[/quote]

Well I’ve figured out how to make the enums on the case I filed \<[https://xojo.com/issue/56384](https://xojo.com/issue/56384)\>  
both “platform specific” and generic in one shot 😛

EDIT - watch for an upcoming blog post about topics related to this at [Writings from the sticks](https://www.great-white-software.com/blog/)

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [July 17, 2019, 9:43pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/34 "2019-07-17T21:43:54Z")

</div>

so I’ve found my last error : “malformed web url”  
it because of accentuated chars in the url like or  
the EncodeURLComponent does not help here, it makes too much of conversion…  
you must replace like this :

`anUrl = anUrl.ReplaceAllB( " ", "%20")
anUrl = anUrl.ReplaceAllB( "", "%C3%A8")
anUrl = anUrl.ReplaceAllB( "", "%C3%A9")
anUrl = anUrl.ReplaceAllB( "", "%C3%AA")
anUrl = anUrl.ReplaceAllB( "", "%C3%A0")
...`

and the 1200 error you must add some info.plist to the (mac) app like described here.  
[http://documentation.xojo.com/topics/communication/internet/using\_non-secure\_urls\_on\_macos\_and\_ios.html](http://documentation.xojo.com/topics/communication/internet/using_non-secure_urls_on_macos_and_ios.html)

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [July 17, 2019, 9:51pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/35 "2019-07-17T21:51:39Z")

</div>

ah yeah international URLS are such fun 🙂

I’d report those as a bug in EncodeUrlComponent as well as it should handle those (probably others as well)

Not sure what decode should do  
Maybe there’s an RFC for both encode & decode

EDIT : and there we go  
[https://en.wikipedia.org/wiki/Internationalized\_Resource\_Identifier](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)  
[https://tools.ietf.org/html/rfc3987](https://tools.ietf.org/html/rfc3987)

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:00pm UTC](https://forum.xojo.com/t/urlconnection-error-1200/49371/36 "2021-04-29T16:00:50Z")

</div>



[Previous page](https://forum.xojo.com/t/urlconnection-error-1200/49371.md?page=1)
