• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [SOLVED] 304 call not returning on 4G, fine in wifi
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] 304 call not returning on 4G, fine in wifi


  • Subject: Re: [SOLVED] 304 call not returning on 4G, fine in wifi
  • From: Rick Mann <email@hidden>
  • Date: Thu, 27 Dec 2012 20:11:42 -0800

On Dec 27, 2012, at 19:10 , Rick Mann <email@hidden> wrote:

> My iOS app makes HTTP requests of my server. It caches the data for one of the calls, and makes an If-Modified-Since request for it. The server returns 304 if it has not been modified.
>
> This works great on Wifi. But I'm seeing over 4G that my server gets the request and makes the response, and about a minute later, the phone still hasn't gotten the response, and eventually returns a timeout error.
>
> This actually happens with two different devices about 30 miles apart, both AT&T iPhone 5, one running one app, the other running a test app that uses the same networking code.
>
> Any ideas how to troubleshoot this? Thanks!

Turns out, I was trying to return a body with my 304 response, which is one of the few responses that is prohibited by the HTTP/1.1 spec from returning a body. Because there was a Content-Length: header specifying content, and some proxy between the phone and my server truncated the body (but did not remove the header, jerkwads), the NS networking code waited (im)patiently for a body that would never come.

Fixed the server to not return a body when returning 304, and all is well.


--
Rick




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >304 call not returning on 4G, fine in wifi (From: Rick Mann <email@hidden>)

  • Prev by Date: 304 call not returning on 4G, fine in wifi
  • Next by Date: How to get used UIFont
  • Previous by thread: 304 call not returning on 4G, fine in wifi
  • Next by thread: How to get used UIFont
  • Index(es):
    • Date
    • Thread