fastly / Viceroy

Viceroy provides local testing for developers working with Compute.
https://fastly.dev/learning/compute/testing/#running-a-local-testing-server
Apache License 2.0
140 stars 35 forks source link

Inconsistent handling of headers with trailing spaces between Viceroy and Fastly #380

Open GeeWee opened 2 weeks ago

GeeWee commented 2 weeks ago

If I make e.g. the following request to both viceroy and my service running on production fastly:

curl --request POST \
  --url https://my_compute_service.com \
  --header 'Authorization: Bearer    ' 

(notice the spaces at the end of the Authorization header) and then print out the header value:

I have tests I'd like to be able to run on viceroy and know that my live service behaves the same way. Note that I think spec-wise Viceroy is doing the right thing, and the compute runtime is not. However, It'd be really nice for these environments to be consistent.