Re: URLAccess version history?
Re: URLAccess version history?
- Subject: Re: URLAccess version history?
- From: Richard <email@hidden>
- Date: Mon, 27 Oct 2003 10:55:17 +1100
- Organization: Faraday R&D
>
(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.
Hmm still broken is it??
I did manage to get around the problems with the setting things in the header
by doing things in some order that did not conflict with what it was trying to
do automatically.
>
>
>
(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.
This is one of the header bugs that I reported and I did get an email
from apple a few days ago saying it is now fixed in Panther.
I did have a workaround but I have forgotten the details.
There is some version info scattered through the URL Access
Manager docs but no summary and I would be surprised
if things are up to date with Panther.
>
>
>
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.
>
>
End of macnetworkprog Digest
_______________________________________________
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.