• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
URLAccess version history?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

URLAccess version history?


  • Subject: URLAccess version history?
  • From: Jennifer Wilson <email@hidden>
  • Date: Sat, 25 Oct 2003 18:53:25 -0500

I have a Mac Palm conduit that syncs with a server via xmlrpc. This conduit has to work on 9.2.2 -> the latest OS, so I am using URLAccess to do the HTTP access. Recently, I upgraded to OS 10.3, and my conduit stopped working. There are two problems.

(1) Formerly, I had this in my code, because it was the only way I could get OS 9.2.2 to send a content-length header, and it didn't have any negative effect on OS 10.2.x:

URLSetProperty(urlRef, kURLHTTPRequestHeader, (void *) "Content-Length", 14);

However, on OS 10.3, this is generating a malformed content-length header.


(2) Second, URLAccess previously set the content-type to text/html (no matter what I tried), but on OS 10.3, it is setting the content-type to application/x-www-form-urlencoded. My xmlrpc server script isn't parsing the data properly with that content-type, so on OS 10.3 I need to set the content-type explicitly.


So, my initial workaround is to check the OS version, and set the URL properties accordingly:

(void) Gestalt(gestaltSystemVersion, &MacOSVersion);

if(MacOSVersion < 0x1030) {
URLSetProperty(urlRef, kURLHTTPRequestHeader,
(void *) "Content-Length", 14);
} else {
URLSetProperty(urlRef, kURLHTTPRequestHeader,
(void *) "Content-Type: text/xml", strlen("Content-Type: text/xml"));
}


This works, but I'm wondering if I should instead be checking the version of URLAccess, not the OS version. Unfortunately, I can't find any sort of version history for URLAccess on Apple's support or developer pages. Does anyone know where I might be able to find this information, or if it is perfectly fine to be looking at the OS version instead of the URLAccess version?

Thanks.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: [solved, almost] sockets in Powerplant?
  • Next by Date: Re: Obtaining proxy authentication info
  • Previous by thread: Re: How the get MAC Address of device in the network
  • Next by thread: Re: URLAccess version history?
  • Index(es):
    • Date
    • Thread