Hello, I hope you are doing well. I have an issue ...
# help
n
Hello, I hope you are doing well. I have an issue when sending a jpeg with wiremock: I setup an answer with a jpeg content as follow: "response": { "status": 200, "bodyFileName" : "Streaming/screenshot.jpeg", "headers": { "Server": "webs/", "X-Frame-Options": "SAMEORIGIN", "Connection": "close", "Content-Length": "13424", "Content-Type": "image/jpeg;" } } The problem is after transfer, the image is not readable and when checking the header, it seems like to be different and does not look like a jpeg header anymore: origin header of my image: 00000000: ffd8 ffe0 0010 4a46 4946 0001 0100 0001 ......JFIF...... 00000010: 0001 0000 ffdb 00c5 0014 0e0f 120f 0d14 ................ 00000020: 1210 1217 1514 181e 3221 1e1c 1c1e 3d2c ........2!....=, 00000030: 2e24 3249 404c 4b47 4046 4550 5a73 6250 .$2I@LKG@FEPZsbP 00000040: 556d 5645 4664 8865 6d77 7b81 8281 4e60 UmVEFd.emw{...N` 00000050: 8d97 8c7d 9673 7e81 7c01 1517 171e 1a1e ...}.s~.|....... 00000060: 3b21 213b 7c53 4653 7c7c 7c7c 7c7c 7c7c ;!!;|SFS|||||||| 00000070: 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c |||||||||||||||| 00000080: 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c |||||||||||||||| 00000090: 7c7c 7c7c 7c7c 7c7c 7c7c 0215 1717 1e1a ||||||||||...... result received by wiremock: 00000000: efbf bdef bfbd efbf bdef bfbd 0010 4a46 ..............JF 00000010: 4946 0001 0100 0001 0001 0000 efbf bdef IF.............. 00000020: bfbd 00ef bfbd 0014 0e0f 120f 0d14 1210 ................ 00000030: 1217 1514 181e 3221 1e1c 1c1e 3d2c 2e24 ......2!....=,.$ 00000040: 3249 404c 4b47 4046 4550 5a73 6250 556d 2I@LKG@FEPZsbPUm 00000050: 5645 4664 efbf bd65 6d77 7bef bfbd efbf VEFd...emw{..... 00000060: bdef bfbd 4e60 efbf bdef bfbd efbf bd7d ....N`.........} 00000070: efbf bd73 7eef bfbd 7c01 1517 171e 1a1e ...s~...|....... 00000080: 3b21 213b 7c53 4653 7c7c 7c7c 7c7c 7c7c ;!!;|SFS|||||||| 00000090: 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c 7c7c |||||||||||||||| Is there a reason for this sudden change? Thanks in advance
w
I think the body files are expected to be text content, not binary data
n
I just figured out when browsing the community wiremock page: I disabled BodyFileTemplating on transformerParameters and it worked
🙌 1