Uppercase Headers
Unanswered
Brown bear posted this in #help-forum
Brown bearOP
Hey! A device that's reaches out to my Next.js service requires a headers to be a specific case like
The result looks all lower case!!
Why!! π How can I get capital headers? I don't have an option to remove the case sensitivity on the device.
CHECK-HASH-MD5. But if I do:return new NextResponse(blob, { headers: { 'CHECK-HASH-MD5': md5 } })The result looks all lower case!!
HTTP/1.1 200 OK
check-hash-md5: lasdklsadlkaslkdsklfjsdfdfWhy!! π How can I get capital headers? I don't have an option to remove the case sensitivity on the device.
4 Replies
@Brown bear Hey! A device that's reaches out to my Next.js service requires a headers to be a specific case like `CHECK-HASH-MD5`. But if I do:
js
return new NextResponse(blob, { headers: { 'CHECK-HASH-MD5': md5 } })
The result looks all lower case!!
HTTP/1.1 200 OK
check-hash-md5: lasdklsadlkaslkdsklfjsdfdf
Why!! π How can I get capital headers? I don't have an option to remove the case sensitivity on the device.
as per Http spec, headers are case insensitive
Brown bearOP
well, the device seems to read them sensitively π
I guess then you can check for both variants?
i think you have to tell that device to fix their code here. their code is not compliant to the http spec hence is buggy, you can't do much about this on your side