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