Expect: 100-continue header corrupted

I'm testing my API-Proxy and when I'm sending in the request (using curl) the 'Expect: 100-continue' header, I see in the JavaScript policy in the

request.headers

that I'm getting- the header becomes "xxpect":"100-continue" in the Proxy.

I see clearly in curl that what's sent is > Expect: 100-continue.

Could you suggest why could this happen? Thanks

0 2 506
2 REPLIES 2

Can you show a curl -v output of your proxy?

Expect header is used by the client (like Curl) to tell the server (in this case Apigee) that the client is intending to send a presumably large payload, and it wants an acknowledgement of that by the server. 

In the case of an Apigee X endpoint, there is a Google cloud load balancer that intervenes between your client and your Apigee X proxy.  The GCLB supports Expect headers and will handle the back-and-forth handshake with the client (curl) to accept the payload, before invoking Apigee. In my tests, the Apigee proxy never sees the Expect header because the GCLB has mediated it out . 

What problem are you solving?   Can you explain why it is important to you that Apigee itself receives the Expect header?

 

Attaching the curl output:

> POST /anna-test/ HTTP/1.1
> Host: 34.95.96.135.nip.io
> User-Agent: curl/7.65.3
> Accept: */*
> Transfer-Encoding: chunked
> Expect: 100-continue
> Content-Type: text/plain
>
{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 100 Continue
< Server: Zscaler/6.1
} [5 bytes data]
* Signaling end of chunked upload via terminating chunk.
} [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< access-control-allow-origin: *
< x-request-id: 3c4abbb3-b8b0-46a7-9cd3-8ec266d32b09
< date: Thu, 06 Oct 2022 14:03:08 GMT
< transfer-encoding: chunked
< Via: 1.1 google
< Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

There is no specific issue, I just wanted to ignore this header in my API Proxy- which apparently is already done by the GCLB 🙂