1

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?

asked Aug 5, 2024 at 19:39
2
  • 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. Commented 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. Commented Aug 6, 2024 at 2:02

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.