nginx-modules / nginx-minify

Simple NGINX minify using Perl5 for CSS/JavaScript/HTML5
56 stars 18 forks source link

nginx error: unterminated quoted string literal #1

Closed benhartwich closed 8 years ago

benhartwich commented 8 years ago

Hi,

it seems, that some javascripts causes nginx error, when they have little issues. The script prettify.js causes the following nginx error at my server (Debian 8): [error] 5741#5741: 21343 call_sv("Minify::js_handler") failed: "unterminated quoted string literal at /usr/share/nginx/perl/Minify.pm line 61.", request: "GET /wp-content/themes/read-v4-2-4/js/google-code-prettify/prettify.js HTTP/1.1", host: "www.benjaminhartwich.de", referrer: "http://www.benjaminhartwich.de/" 2015/11/29 19:29:47 [alert] 5741#5741: 21343 header already sent, server: benjaminhartwich.de, request: "GET /wp-content/themes/read-v4-2-4/js/google-code-prettify/prettify.js HTTP/1.1", host: "www.benjaminhartwich.de", referrer: "http://www.benjaminhartwich.de/"

Is there a possibility to suppress such errors or to define case sensitivy at your perl script?

Regards,

denji commented 8 years ago

This is an example implementation and it should work for simple uncompressed code.

  1. Better write to the author of the module – JavaScript-Minifier-XS:

    Graham TerMarsch <cpan@howlingfrog.com>
  2. You can also try a more complex solution https://github.com/pagespeed/ngx_pagespeed (linux only).