0

My application has been in production for several months and everything worked fine. Howwever, since February 24, 2023, whenever it deletes a calendar event via DELETE /me/calendars/{id}/events/{id}, the response from Microsoft Graph includes a Transfer-Encoding header despite this being a 204 status:

HTTP/1.1 204 No Content
Cache-Control: private
Transfer-Encoding: chunked
Strict-Transport-Security: max-age=31536000
request-id: *redacted*
client-request-id: *redacted*
x-ms-ags-diagnostic: *redacted*
Preference-Applied: IdType=ImmutableId
Date: Sun, 23 Apr 2023 10:16:44 GMT

As far as I understand section 6.1 "Transfer-Encoding" of RFC 9112, that header is illegal in this situation:

A server MUST NOT send a Transfer-Encoding header field in any response with a status code of 1xx (Informational) or 204 (No Content).

Note that the event is deleted successfully. However, due to the HTTP spec violation, the java.net.http HTTP client throws an IOException saying "unexpected content length header with 204 response". (Reading the source, one can see that despite the wording of that message, it is also used when a Transfer-Encoding header is set.)

I changed my code to catch and ignore this specific exception, but this is a bad workaround as the exception being thrown still slows down the application.

So far, my production server logged 1644 occurrences of this problem; the latest one was this morning. I therefore guess these are the majority of or even all deletion requests my application issued to MS Graph.

Note: I already posted this on the Microsoft Q&A forums, but got no answers.

Questions

  • Is there anything I am overlooking?
  • Can anybody else confirm the presence of the Transfer-Encoding header?
  • Was this an intentional change that was announced somewhere?
2
  • 1
    I logged a case with Microsoft about this back in March learn.microsoft.com/en-us/answers/questions/1184068/… and they accepted it as a bug. If you can log your own support case as this helps push the PM's to fix it faster. Commented Apr 23, 2023 at 22:01
  • Oooh, great, thanks a lot! If you post your comment as an answer, I'll accept it gladly. Commented Apr 24, 2023 at 6:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.