I am using libwebsockets C++ library for my http server. I can download a file using API with postman
Response Headers content-type: application/zip content-length: 107627
cache-control: no-store Content-Disposition: attachment;
filename=logs.zip
I tried with cURL, which is successful:
curl --http1.1 -k -OJ https://x.x.x.x/api/files/download-logfile
But when I use Chrome browser I see error:
The webpage at https://x.x.x.x/api/files/download-logfile might be temporarily down or it may have moved permanently to a new web address. ERR_HTTP2_COMPRESSION_ERROR
I tried to enable in library; still same problem
-DLWS_WITH_HTTP2=ON
-DLWS_WITH_HTTP_STREAM_COMPRESSION=1
What could be the problem here? Am I missing anything here?
-
Chrome is probably sending an 'Accept-Encoding: gzip, deflate, br', I'm curious if the curl call fails with a similar error if you send the same header.Andy C– Andy C2024年08月05日 21:35:46 +00:00Commented Aug 5, 2024 at 21:35
-
1@James: Next time, please fix all the problems, but don’t fix problems that don’t exist. And enter a meaningful edit summary.G-Man Says 'Reinstate Monica'– G-Man Says 'Reinstate Monica'2024年08月06日 02:02:06 +00:00Commented Aug 6, 2024 at 2:02