Closure Compiler Service always responds with status 302
See original GitHub issueHi!
I do not know if this is the right place for these kinds of questions, if it is not the place sorry in advance.
I noticed that the Closure Compiler Service is not working correctly because it always responds with a 302 status code.
I have a python script that uses the Closure Compiler Service for compile my library. I think that it is not an error in my script because even if you follow the getting started tutorial you will get the same error.
Copy pasting from the getting started tutorial:
#!/usr/bin/python2.4
import httplib, urllib, sys
params = urllib.urlencode([
('js_code', sys.argv[1]),
('compilation_level', 'WHITESPACE_ONLY'),
('output_format', 'text'),
('output_info', 'compiled_code'),
])
headers = { "Content-type": "application/x-www-form-urlencoded" }
conn = httplib.HTTPConnection('closure-compiler.appspot.com')
conn.request('POST', '/compile', params, headers)
response = conn.getresponse()
data = response.read()
print data
conn.close()
When we run in a terminal the following command
python compile.py 'alert("hello");// This comment should be stripped'
This command should prints out the compressed code from the Closure Compiler response, but the response is empty and the status code of the response is 302.
I am noticing this problem since 25th of October, because this day I could compile my library using the Closure Compiler Service.
Do you know if some thing change during this days?
Thank you very much!!!
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Yes, we have the same problem. Over 300 sites using our CMS cannot minify after they change their template in our template editor.
The solution: change http to https:
https://closure-compiler.appspot.com/compile
Awesome. I waste around 4h and nothing get help. Its worked as charm with above solutions. Thank you very much…)