On Mon, 30 Aug 2010 12:51:27 +1000, "Paul Freeman" <paul.freeman@xxxxxxxxxx> wrote: > Amos > I suspect I may have come across another situation related to chunked > Transfer-Encoding although I am not sure yet. > > I have verified that using a HTC Desire I can successfully sync email, > calendar and notes including sending new calendar items and new email and > replies to emails. > > However, when I try this using an iPhone (3GS, running IOS 4.0.1) it cannot > send email. Pulling data (calendar, email) from Exchange works OK though. > > Squid is replying with a 501 error. I have increased debugging on the > squid > reverse proxy and notice the iPhone is sending a post request, which I have > included below (certain private values replaced), which Squid does not > like. > > POST > /Microsoft-Server-ActiveSync?User=username&DeviceId=fjsdlfjlsdjflskj&DeviceTy > pe=iPhone&Cmd=SmartReply HTTP/1.1 > Host: external.server.name > Content-Type: application/vnd.ms-sync.wbxml > Ms-Asprotocolversion: 14.0 > User-Agent: Apple-iPhone2C1/801.306 > X-Ms-Policykey: 4281201554 > Authorization: Basic asjlfjdal;sjdfl;ajsdf;lajsl;f > Accept: */* > Accept-Language: en-us > Accept-Encoding: gzip, deflate > Connection: keep-alive > Transfer-Encoding: Chunked > > What causes Squid to issue a 501 reply? Is it related to > Transfer-Encoding? It's emitted on OPTIONS requests, unidentified transfer-encodings, and URL which are unknown or invalid protocols for the method given. The above POST might be 501 rejected if it was received by Squid as a non-transparent or non-reverse-proxy request. Or if the squid version was older than 3.1.5. Which only accept "chunked" as implied by the RFC texts. Newer releases are supposed to be more lenient and accept encoding names case-less. Amos