firebase-framework-tools icon indicating copy to clipboard operation
firebase-framework-tools copied to clipboard

fix: sveltekit server endpoint buffer response

Open m3tasploit opened this issue 1 year ago • 3 comments

Fix for corrupt images when responding with image/jpeg or any binary data from sveltekit Api endpoint

m3tasploit avatar Apr 06 '24 12:04 m3tasploit

@m3tasploit LGTM. Q, does the text content-type repsonse work ok if you always respond with a buffer? Best to avoid conditionals when possible

jamesdaniels avatar Apr 19 '24 14:04 jamesdaniels

Oh, sorry i forgot that case, I'll try different content types and update code if necessary

m3tasploit avatar Apr 19 '24 14:04 m3tasploit

@m3tasploit LGTM. Q, does the text content-type repsonse work ok if you always respond with a buffer? Best to avoid conditionals when possible

I've added check for commonly used text content-types. I'm not sure if this is the correct way to go.

m3tasploit avatar Apr 19 '24 15:04 m3tasploit