Loading

HTTP/2 Header Case Normalization

게시 일자: Apr 17, 2026
상세 설명

What Changed?                                                                                                                                      

With the migration from Akamai to Cloudflare for the CDN, HTTP headers are now normalized to lowercase per the HTTP/2 standard (RFC 7540).                             

- Previous (Akamai): Headers preserved their original casing (e.g., Content-Type)                                                                       

- Current (Cloudflare): All headers are lowercase (e.g., content-type) to ensure uniformity for search, storage, and natural language processing.

Why?                                                                                                                                               

Cloudflare strictly enforces HTTP/2 standards, which require lowercase headers. This aligns with RFC 7230, which states header names should always be treated as case-insensitive.    

Who's Affected?                                                                                                                                   

Customers with custom Apex code that use case-sensitive header name matching are affected by the change. 

솔루션

Update your applicable code to treat header names as case-insensitive to avoid breaking the code.                                                                      

// ❌ BEFORE - Case-Sensitive (Will Break)                                                                                                          

  RestRequest req = RestContext.request;           

  String contentType = req.headers.get('Content-Type');  // Returns null with HTTP/2                                                                  

  String authToken = req.headers.get('Authorization');    // Returns null with HTTP/2                                                                 

 // ✅ AFTER - Case-Insensitive (Works Correctly)                                                                                                    

  RestRequest req = RestContext.request;                                                                                                              

  String contentType = req.headers.get('content-type');   // Works with HTTP/2                                                                        

  String authToken = req.headers.get('authorization');     // Works with HTTP/2  

Note: Since Salesforce instances are being migrated from Akamai to Cloudflare at different times, to ensure compatibility both before and after the migration, the safer approach would be:

String contentType = String.isBlank(req.headers.get('content-type'))?req.headers.get('Content-Type'):req.headers.get('content-type');

Once your instance has been migrated, you can simplify to:

String contentType = req.headers.get('content-type');

Knowledge 기사 번호

005318663

 
로드 중
Salesforce Help | Article