Also with NSURLConnection i get only _one_ didReceiveResponse when
receiving a multipart/x-mixed-replace
allHeaderFields show content-type:multipart/x-mixed-
replace;boundery=myboundary. (boundary is send by server as tcpflow
shows).
Apple documentation explicitly mentions that didReceiveResponse can
be called multiple times in case of serverpush.
Data appends fine (but not useful because i need to handle the
individual parts separated by the boundary)
connectionDidFinishLoading is called when i limit the content the
number of parts by sending the final boundary. If no terminating
boudary is send the connection keeps appending data
Any thoughts will be _highly_ appreciated. This thing is really
driving me nuts since the multipart stream work as expected in Safari
2.0.2 under 10.4.3 (and with minibrowser in the developer folder)
Jan
On Dec 23, 2005, at 2:16 AM, Maciej Stachowiak wrote:
On Dec 12, 2005, at 2:30 AM, Jan DeVries wrote:
Hi,
I am still new and still waiting for my books and still having
trouble with NSURLConnection...
Can anyone shed some light on my problem? What am i doing or
thinking wrong here?
Firstly i get only one didRecieveResponse where i expect more then
one and
also i get expectedContentLength -1 where allHeaderFields show
Content-Length: 23456. (As does tcpflow)
didReceiveResponse
I use apple's NSURLConnection sample code. I have no other code
except for a few lines to NSLog.
I have set up www.example.com/index.html returning a 302 pointing
to Location: www.example2.com/hello.html
On a redirect, you get a willSendRequests: including the redirect
response. You only get a didReceiveResponse: for the final response
that is not a redirect.
When requesting www.example.com/index.html i get only a
didRecieveResponse for example2.com/hello.html.
I would expect one redirectResponse and two didReceiveResponses:
one for example.com/index.html HTTP 302 and then one for
example2.com/hello.html HTTP 200.
I do get a redirectResponse showing the requested and the redirect
url
Data is appends fine and connectionDidFinishLoading is called when
url example2.com/hello.html has finished loading.
expectedContentLength
expectedContentLength returns -1 while in allHeaders i can see
Content-Length: 23456 ( as in tcpflow). So the server clearly
sends a content-length header...
This part might be a bug. Please submit a bug report.
Regards,
Maciej
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden