My iPhone app accesses a server through a REST-ish API. I use sessions that are linked to the client's IP address in order to help prevent session hijacking. But I've noticed some strange sequences of requests in my server logs from certain client devices. What happens is different URLs on my server are being requested by the same client from different IP addresses. A typical sequence looks something like this:
ipaddr1: POST /users/foo/login -- grants a session linked to ipaddr1
ipaddr2: GET /users/foo/resource -- 401 Not Authorized (IP address mismatch in session)
ipaddr1: POST /users/foo/login -- grants a session linked to ipaddr1
ipaddr2: GET /users/foo/resource -- 401 Not Authorized (IP address mismatch in session)
ipaddr1: POST /users/foo/login -- grants a session linked to ipaddr1
ipaddr2: GET /users/foo/resource -- 401 Not Authorized (IP address mismatch in session)
...
and so on, where these requests are coming in about 3 seconds apart. Sometimes there are even up to 4 ip addresses in play at once!
On the client side I'm just using a normal NSURLConnection to request each resource, so I don't think it's anything I'm doing in my code.
Has anybody seen anything like this before? Could it be some kind of weird proxying thing?