Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection didReceiveResponse



Do you use a local proxy (i.e. something on your maching like burp/ proxy)? It can handle redirects but sometimes changes http headers...

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


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...


Jan
_______________________________________________
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/rsherry% 40adobe.com


This email sent to email@hidden


_______________________________________________ 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

This email sent to email@hidden
References: 
 >NSURLConnection didReceiveResponse (From: Jan DeVries <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.