Layer7 API Management

Expand all | Collapse all

Configuration Driven Policy

  • 1.  Configuration Driven Policy

    Posted 03-06-2019 01:54 PM

    Hello,

     

    Quick question... I noticed that the gateway strips the content-type header when dealing with a DELETE verb.  Is this expected behavior?  Is there a way to adjust this if it is? 

     

    Asking because a backend service is expecting the content-type header (rightly, or wrongly) and the gateway is stripping it out unexpectedly. 

     

    Thanks,

     

    Alejandro



  • 2.  Re: Configuration Driven Policy

    Posted 03-06-2019 03:43 PM

    Hi  Alejandro,

     

    Is the header not making it to the Gateway or being stripped at the Gateway before hitting the backend?

     

    You may want to take a look at this posting: https://communities.ca.com/message/242163716-re-route-via-http-assertion-how-to-overide-some-request-header-entry?commen… 

     

    Slightly different but it explains the route assertion behavior.

     

    Regards,

    Joe



  • 3.  Re: Configuration Driven Policy

    Posted 03-06-2019 05:10 PM

    DELETE is like GET, it is to ask the server to delete a resource which identified by the uri.

    In another word, the payload and content-type in Delete request has no meaning.

    As per RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content ,

       A payload within a DELETE request message has no defined semantics;
       sending a payload body on a DELETE request might cause some existing
       implementations to reject the request.

    in an other word, payload(content-type)  is allowed, but the server should ignore it, or reject it.

     

    I done a test on gateway 9.3, it's true that the gateway will remove the content-type and payload when route the DELETE request to the backend -- gateway is also a server against the requestor, the gateway ignores the payload(content-type) for DELETE request is expected as per the RFC.

     

    I am curious what's purpose the backend service expects content-type (ie. expects a payload) for a DELETE request?