Ive been observing the strange but consistent behavior of the iOS MDM native agent.
When we redirected it to another URL, responding with HTTP 301, 302 or 307, the agent changed its PUT HTTP address to GET, completely removing the HTTP request body.
For example, this was the deviceβs first HTTP request to [URL-1]:
PUT [URL-1] HTTP/1.1 Host: [HOST] User-Agent: MDM/1.0 Content-Length: 306 Accept: */* Content-Type: application/x-apple-aspen-mdm Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive Proxy-Connection: keep-alive <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Status</key> <string>Idle</string> <key>UDID</key> <string>86ff0b7c0129f1c1ed4ff36984c1a2a3e5e06c81</string> </dict> </plist>
We answered HTTP 301 and redirected it to [URL-2]:
HTTP/1.1 301 Moved Permanently Content-Type: text/html; charset=UTF-8 Location: [URL-2] X-Powered-By: ASP.NET Date: Tue, 10 Jul 2012 10:48:31 GMT Content-Length: 182 <head><title>Document Moved</title></head> <body><h1>Object Moved</h1>This document may be found <a HREF="[URL-2]">here</a></body>
The device accessed [URL-2] using this HTTP request (changed the HTTP verb to GET and dropped HTTP completely):
GET [URL-2] HTTP/1.1 Host: [HOST] User-Agent: MDM/1.0 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive Proxy-Connection: keep-alive
Does the primary MDM agent support HTTP redirection? If so, what do we need to change so that it does not delete the HTTP body and does not change the HTTP PUT verb?
source share