I tried that and that lead me to change the User-Agent header to AppleWebKit. Now I get a redirect and here are the headers I get back:

    "Cache-Control" = "no-cache";
    Connection = close;
    "Content-Length" = 136;
    "Content-Type" = "text/html; charset=utf-8";
    Date = "Sun, 13 Jul 2008 21:34:53 GMT";
Location = "http://artorius.backpackit.com/images/0185/6042/thumbnail.jpg/as/6.jpg ";
    Server = "Mongrel 1.1.5";
    Status = "302 Found";
    "X-Runtime" = "0.00300";

Unfortunately it still doesn't work because the Location header redirects me to the same place as my original request. Why would it do that?

Rod

On Jul 13, 2008, at 12:42 PM, Jens Alfke wrote:


On 13 Jul '08, at 9:49 AM, Rod Schmidt wrote:

I have an embedded webkit in my app. In my HTML that I display in the webview I have an image that refers to an image a Backpack web page. In Safari when you type in the URL for this image it gets redirected to another image that is stored on the Amazon web service. However, in my webview the image doesn't get redirected and hence doesn't get displayed.

Compare the HTTP requests as sent by your app vs. Safari. The best way to do this is by using tcpflow to log traffic to port 80.

(Unfortunately tcpflow still doesn't ship with Mac OS. Try googling "tcpflow mac" to find a Mac installer; or you can use macports or fink to install it. I highly recommend having tcpflow if you're doing any development that sends HTTP requests!)

—Jens

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to