• 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
Limitation in CFNetwork (uses HTTP/1.0 instead of HTTP/1.1)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Limitation in CFNetwork (uses HTTP/1.0 instead of HTTP/1.1)


  • Subject: Limitation in CFNetwork (uses HTTP/1.0 instead of HTTP/1.1)
  • From: Greg Hurrell <email@hidden>
  • Date: Sat, 24 May 2003 16:41:53 +0930

I have just run into problems trying to use Cocoa to download things from the web (using methods like NSString's initWithContentsOfURL and others).

In my efforts to troubleshoot the problem I have seen from looking at logs on my own webserver that attempts at downloading using Cocoa produce entries like:

www.xxx.yyy.zzz - - [24/May/2003:16:21:45 +0930] "GET /file.txt HTTP/1.0" 200 30194 "-" "CFNetwork/1.1" mod_gzip: 0pct.

If I hit the same URL in my browser the following log messages appear:

www.xxx.yyy.zzz - - [24/May/2003:16:26:48 +0930] "GET /file.txt HTTP/1.1" 200 603 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es) AppleWebKit/74 (KHTML, like Gecko) Safari/74" mod_gzip: 0pct.

So it appears that "CFNetwork" (Cocoa) is making the request using HTTP/1.0 instead of HTTP/1.1.

For a description of the differences between the two versions, see:

http://www.research.att.com/~bala/papers/h0vh1.html

For me, the key section is this:

The Domain Name System (DNS) allows multiple host names to be bound to the same IP address. Unfortunately, because the original designers of HTTP did not anticipate the ``success disaster'' they were enabling, HTTP/1.0 requests do not pass the hostname part of the request URL.

As such, any attempt to access a URL on a host with multiple virtual domains will fail.

Questions:
- Why is Cocoa using HTTP/1.0?
- Is there a way to force it to use HTTP/1.0?

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

  • Follow-Ups:
    • Re: Limitation in CFNetwork (uses HTTP/1.0 instead of HTTP/1.1)
      • From: Bryan Blackburn <email@hidden>
  • Prev by Date: Re: Subversion revision controll system
  • Next by Date: Re: Limitation in CFNetwork (uses HTTP/1.0 instead of HTTP/1.1)
  • Previous by thread: Re: Is this logical?
  • Next by thread: Re: Limitation in CFNetwork (uses HTTP/1.0 instead of HTTP/1.1)
  • Index(es):
    • Date
    • Thread