dyrnq / springboot-httpbin

A java(springboot) port of the venerable httpbin.org HTTP request & response testing service.
https://hub.docker.com/r/dyrnq/springboot-httpbin
MIT License
1 stars 0 forks source link

Get case insensitive request header value #1

Open dyrnq opened 1 month ago

dyrnq commented 1 month ago
#!/bin/bash

for jar in tomcat jetty undertow ; do

echo "##########${jar}"

docker rm -f springboot-httpbin >/dev/null 2>&1; docker run -d --name springboot-httpbin -e JAR=$jar -p 18080:8080 dyrnq/springboot-httpbin

sleep 5s && echo "";

(
    echo ""
    curl http://127.0.0.1:18080/headers -H "X-API-KEY: CTxt4CiowRKsE2ElVI4e3lz9bG4s1jEl2fKkEe33jBBpnflAwT142VJyerIfu6EM"
    echo ""
)

done
##########tomcat
db793d2e39d65b8af288294ac139b5d5bbce7b01843aa9b02584460367846ffe

{
  "headers": {
    "x-api-key": "CTxt4CiowRKsE2ElVI4e3lz9bG4s1jEl2fKkEe33jBBpnflAwT142VJyerIfu6EM",
    "host": "127.0.0.1:18080",
    "user-agent": "curl\/7.88.1",
    "accept": "*\/*"
  }
}
##########jetty
b21bade56bea3e9d766fa1583c261fd8ab30766d9e2c248f272102c892aa6bcf

{
  "headers": {
    "Accept": "*\/*",
    "User-Agent": "curl\/7.88.1",
    "X-API-KEY": "CTxt4CiowRKsE2ElVI4e3lz9bG4s1jEl2fKkEe33jBBpnflAwT142VJyerIfu6EM",
    "Host": "127.0.0.1:18080"
  }
}
##########undertow
99850497ef7f03e80b2af6319f3842a574f479943be276d524d725678b44b034

{
  "headers": {
    "Accept": "*\/*",
    "User-Agent": "curl\/7.88.1",
    "X-API-KEY": "CTxt4CiowRKsE2ElVI4e3lz9bG4s1jEl2fKkEe33jBBpnflAwT142VJyerIfu6EM",
    "Host": "127.0.0.1:18080"
  }
}