Html Gzip http response

I’m having this error when packaging and deploying on webserver:

Downloading failed:
Downloaded a compressed file WorldHtml.data.jsgz without the necessary HTTP response header “Content-Encoding: gzip” specified!
Please configure gzip compression on this asset on the web server to serve gzipped assets!

I have gzip turned on the webserver

Which http server do you use?

the server i’m using is Nginx

Make sure your server is responding with the right headers for the type of content you’re using, and that your request from the client uses the right headers, too.

I’m not sure I know how to do that

Would it be simpler to use something else like apache? I’m not really a web developer I just need a simple host at moment for what I did. The server is my own so I can install any web server. I just need a quick way to play my game on web, its working great on local

What language does your Nginx server use to handle incoming HTTP requests and respond to them? PHP? Python? Does the configuration file have settings to automatically add headers to the response, or is it explicitly stated in the code that generates the response?

I don’t know Nginx myself very well, but with most servers I’ve seen you have the main server software running and then you have the endpoint scripts that it routes the requests to based on what URL was used to hit it by the requestor. So basic example you might have an index.php file that the server knows it should run using PHP interpreter when the client requests http://mywebsite-wheremyserverlives/pagetheywant/index.php, and the index.php has code that runs on the server side only to generate the HTML that is received on the user’s browser.

With Unreal projects you’ll probably be getting back something besides a web page though, like that gzjs file you mentioned.

It can be set up lots of different ways but the bottom line is that if you have control of the server and its scripts and databases etc, then you probably can fix the problem if you can just find out what part of it creates the content and headers for the response back to the client that requested your server URL. I couldn’t tell you where that is because every server’s set up a bit differently, though some use commonly-known platforms and configuration schemas, so that might gives clues where to look. look for keywords like “Content-Type” and “Allowed” etc.and of course “Content-Encoding” - maybe something is already setting it somewhere and you just need to change what kind it’s using. But if not then you won’t see it. Also look for keywords like “response” “POST”, “GET”, “200”, “http”, “header” etc.

HTTP servers don’t have “language”, dynamism in HTTP is only extra feature and actually a more of a hack.

People now day forget that HTTP protocol originally was made for very simple task, to request files from file system that server is bind to and alone it should output proper headers depending on file requested, if does not it means it’s not configured correctly or it does not support the feature altogether

@Esteves Did you set up this properly?

http://nginx.org/en/docs/http/ngx_http_gzip_module.html

Do you got gzip_types configured correctly?

I also found this

1 Like