0

Anyone ever had issues with casing in headers and AWS elasticsearch service? Trying to call _cat/health, but the service returns 403. Connection: Close doesn't work, Connection: close works. This is annoying in .NET Framework where the casing is forced.

We're using elasticsearch 5.6 in AWS elasticsearch service.

Example of a call that doesn't work (in postman):

Accept: application/json
Connection: Close
cache-control: no-cache
Postman-Token: xxxxxxxxxxxxxxx
Host: xxxxxxxxxxxxxxx
X-Amz-Date: 20181130T075307Z
Authorization: AWS4-HMAC-SHA256 Credential=xxxxxxxxxxxxxxx, SignedHeaders=accept;cache-control;connection;host;postman-token;x-amz-date, Signature=xxxxxxxxxxxxxxx
User-Agent: PostmanRuntime/7.4.0
accept-encoding: gzip, deflate

Example of a call that works:

Accept: application/json
Connection: close
cache-control: no-cache
Postman-Token: xxxxxxxxxxxxxxx
Host: xxxxxxxxxxxxxxx
X-Amz-Date: 20181130T075307Z
Authorization: AWS4-HMAC-SHA256 Credential=xxxxxxxxxxxxxxx, SignedHeaders=accept;cache-control;connection;host;postman-token;x-amz-date, Signature=xxxxxxxxxxxxxxx
User-Agent: PostmanRuntime/7.4.0
accept-encoding: gzip, deflate

Is AWS really that strict when it comes to headers? Has anyone had any experience with this?

CosX
  • 1,920
  • 2
  • 15
  • 25
  • [Per RFC 7230](https://tools.ietf.org/html/rfc7230#section-6.1), `close` in lowercase is the correct value. Funnily, though, header names are case-insensitive, so `connection: close` would work as well. – Val Nov 30 '18 at 08:31
  • header names are not case sensitive according RFC2616 and header values depends on application so may be aws is strict about that but i'm not sure – varnit Nov 30 '18 at 10:16
  • @varnit RFC 2616 has been obsoleted by RFC 7230 :-) – Val Nov 30 '18 at 11:42
  • thankyou @val i did not know – varnit Nov 30 '18 at 11:43
  • @varnit Not a big deal as both specs say the same thing regarding the problem at hand. – Val Nov 30 '18 at 11:44
  • yes that's true – varnit Nov 30 '18 at 11:46

0 Answers0