Apigee Edge is removing quotes from the header value ?

Not applicable

As per standard definetion of ETag and If-None-Match headers , value of these headers would be surrounded within double quotes.

However, when using Apigee edge, we observe that when Apigee edge receives values from target, it removes double quotes and parses only the string part. Same thing happens when client sends If-None-Match header value within double quotes. Apigee edge removes quotes before sending to target.

Example : target sends ETag : "entity-tag-value"

Apigee shows and sends to client : ETag : entity-tag-value

We tried to update it using Javascript and also in Assign Message policy but nothing seems to work. Is there any workaround for this ?

0 4 642
4 REPLIES 4

that sounds like a bug! But it is not at all what I am seeing.


What I see: when I pass in the If-none-match header, it gets passed through to the target with the quotes. And when the target sends back an ETag, it includes quotes.

To illustrate I have a proxy configured as a pass-through, and it points to a target that just echo's what it receives in the request, back in a json response. When I pass in an if-none-match header, like so:

curl -i https://cap500-test.apigee.net/echo-1 -H 'If-None-Match: "abcdefg"' 

..what I see in response is

HTTP/1.1 200 OK
Date: Thu, 16 Feb 2017 22:07:21 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 517
Connection: keep-alive
Server: Cowboy
X-Powered-By: Express
Etag: W/"205-o9M77adKjXwcpZ09uKcSMg"
Via: 1.1 vegur


{
  "url": "/",
  "method": "GET",
  "headers": {
    "host": "dc-echo.herokuapp.com",
    "connection": "close",
    "x-forwarded-for": "10.0.7.199, 54.208.113.95",
    "x-forwarded-port": "443",
    "x-forwarded-proto": "https",
    "user-agent": "curl/7.50.3",
    "accept": "*/*",
    "if-none-match": "\"abcdefg\"",
    "x-request-id": "2193c53e-6af5-46dc-93f3-2bde0991768a",
    "via": "1.1 vegur",
    "connect-time": "0",
    "x-request-start": "1487282841861",
    "total-route-time": "0"
  },
  "body": {}
}



As you can see, the response header includes a properly quoted ETag and the payload (which echos the request) includes a quoted If-none-match.

Sounds like you are seeing results that differ from mine.

Can you describe your Edge setup? SaaS or customer-managed? If the latter, what version? If the former, paid or trial?

Bump. Any response to my question, Manish?

Hi @Dino,

Sorry for delay.

We are using Apigee On Prem version 4.16.09.00 . For some reason we see Apigee is removing quotes from all header values . We have asked our operations to check various logs and see on which component its getting done. If I find something important then would post it here.

ok sounds good.

When you say

Apigee shows and sends to client : ETag : entity-tag-value

...how are you verifying that this is what Apigee Edge is returning? are you using Curl? Something else? It could be that the trace UI does not display the quoted value with full fidelity. (I haven't checked). When I tested my case, I used curl, and it shows everything accurately.