• 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
Re: POST message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POST message


  • Subject: Re: POST message
  • From: Jim Luther <email@hidden>
  • Date: Wed, 26 Oct 2005 07:18:35 -0700

On Oct 26, 2005, at 6:56 AM, Jan E. Schotsman wrote:

On Oct 25, 2005, at 3:38 PM, Jim Luther wrote:

Here's the code to add a "Range" header to message (a variable of type CFHTTPMessageRef) to get the remainder of a resource starting at offset (a variable of type off_t):

currentLengthString = CFStringCreateWithFormat (kCFAllocatorDefault, NULL, CFSTR("bytes=%qd-"), offset);

In XCode the value offset = 8192 becomes a very large number, at least that is what the number formatter shows. Using %d instead of % qd results in correct display.

That would happen if the variable offset were a 32-bit value. As I noted, offset is of type off_t which is a 64-bit signed value. Why 64- bit support? Because that code snippet is from the Mac OS X WebDAV file system (which uses CFNetwork in Tiger) which has to support resource sizes larger than a 32-bit value can represent.


- Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: POST message (From: "Jan E. Schotsman" <email@hidden>)
 >Re: POST message (From: Frederick Cheung <email@hidden>)
 >Re: POST message (From: Jim Luther <email@hidden>)
 >Re: POST message (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Re: POST message
  • Next by Date: Re: POST message
  • Previous by thread: Re: POST message
  • Next by thread: Re: POST message
  • Index(es):
    • Date
    • Thread