• 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
Streamed HTTP POST request - no response if via Proxy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Streamed HTTP POST request - no response if via Proxy


  • Subject: Streamed HTTP POST request - no response if via Proxy
  • From: daniel <email@hidden>
  • Date: Mon, 22 Nov 2004 21:03:50 -0800


I am using CFNetwork's CFReadStreamCreateForStreamedHTTPRequest to perform an HTTP POST. This works great, except for when I'm working through a proxy server. When I'm going through a proxy, the upload appears to work fine, but the stream never appears to get a response from the server when it's complete. I would suspect my proxy server, but a user reported the problem against a completely different proxy server.


These are the steps I'm following:

1. I set up an HTTP request with the desired upload URL.
2. Create a stream from the request, providing my upload data stream.
3. Attach proxy info to the stream (kCFStreamPropertyHTTPProxy).
4. Open the stream (all of my data is uploaded with no apparent errors from either CFNetwork or from inspection with tcpdump).
5. Wait for there to either be bytes, an error, or for the status of the stream to be "at end."


I end up waiting at step 5 until I finally time out with a stream error of "-1". I assume CFNetwork has timed out on the request after not seeing any activity for some time. At this point the read and write buffers to the proxy server are both empty.

Now for my dark confession: I'm using a unix-domain socket read/write stream to provide the data for the upload. I know, the shame! But the fact is it's been working wonderfully in every other regard. Am I naive to think I could get away with this? I don't really understand the "risk" part of unix-domain sockets not being supported. I have just seen references about it on this list. Does "not supported" mean that I will run into occasional quirks like this - or is there something more heinous to fear? Assuming I want to continue to "take my chances" - are there any guesses as to how I might get around this problem?

Any comments about this greatly appreciated.  Thanks!

Daniel

_______________________________________________
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


  • Follow-Ups:
    • Re: Streamed HTTP POST request - no response if via Proxy
      • From: Jeremy Wyld <email@hidden>
  • Prev by Date: Can't locate info on the "reason" field of the TDiscon struct
  • Next by Date: URLDownload with username and password
  • Previous by thread: Re: Can't locate info on the "reason" field of the TDiscon struct
  • Next by thread: Re: Streamed HTTP POST request - no response if via Proxy
  • Index(es):
    • Date
    • Thread