Just mimic behaviour of HttpObjectEncoder for now to better compare it