Skip to content

Closure Compiler Service always responds with status 302 #2693

@jmbrocal

Description

@jmbrocal

Hi!

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!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions