ralexstokes / mev-rs

a gateway to a network of block builders
Other
420 stars 77 forks source link

getHeader 204 response sets incorrect content-type header #268

Open nflaig opened 4 months ago

nflaig commented 4 months ago

In case case mev-rs receives no bid from any builder it will respond with 204 status code to a getHeader, this is as expected but it also sets content-type and content-length header while response payload does not contain JSON data.

These are the headers in 204 response

'content-type': 'application/json',
'content-length': '114'

but as the status code 204 - No Content implies, it shouldn't be sending any content, nor set a content type header