URLOpen - POST - URLIdle
URLOpen - POST - URLIdle
- Subject: URLOpen - POST - URLIdle
- From: Chris Griffin <email@hidden>
- Date: Mon, 29 Mar 2004 11:01:43 -0800
I am trying to upload a file using an HTTP POST. The POST is being sent
to a CGI and the CGI returns a local file path that it assigns to the
uploaded file that I will use later. By sniffing the packets I can see
that the header and body of the POST are fine and the CGI accepts the
file and returns a small HTTP response that contains the path that it
has assigned. I have two problems. The first is the code crashes at the
end somewhere inside URLIdle. I have tried to find ways of not calling
URLIdle with no success. I am calling URLOpen with kURLUploadFlag and
kURLAllEventsMask. I have a timer and notifier proc. URLIdle is called
in the timer. BTW this code is copied/modeled after the URLAccess
example. Calls to the notifier routine look like this:
kURLInitiatedEvent
kURLPropertyChangedEvent
kURLInitiatedEvent
kURLPropertyChangedEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLPeriodicEvent
kURLResourceFoundEvent
kURLPropertyChangedEvent
kURLDownloadingEvent
kURLPropertyChangedEvent
I find it interesting that there is no kURLPercentEvent or
kURLDataAvailableEvent. Also if I look at currentSize in the
URLCallbackInfo that is passed to my notifier proc it is always 0.
Second I need to figure you where the return data is going. Maybe if
the crash is fixed kURLDataAvailableEvent will get called? 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.