x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.21
Tags:
more ▼

asked Mar 20 '19 at 05:08 PM in Packaging & Deployment

avatar image

Esteves
96 5 9 16

avatar image Shadowriver Mar 20 '19 at 08:32 PM

Which http server do you use?

avatar image Esteves Mar 20 '19 at 11:02 PM

the server i'm using is Nginx

avatar image mightyenigma Mar 20 '19 at 11:07 PM

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.

avatar image Esteves Mar 20 '19 at 11:08 PM

I'm not sure I know how to do that

avatar image mightyenigma Mar 20 '19 at 11:14 PM

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.

avatar image mightyenigma Mar 20 '19 at 11:18 PM

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.

avatar image Shadowriver Mar 20 '19 at 11:30 PM

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

https://medium.com/@selvaganesh93/how-to-serve-webpack-gzipped-file-in-production-using-nginx-692eadbb9f1c

avatar image Esteves Mar 20 '19 at 11:51 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question