Commit 941d55ce by Calen Pennington

Merge pull request #1229 from MITx/feature/ichuang/update-symmath-server

Feature/ichuang/update symmath server
parents 5a95dd28 9a0d8566
......@@ -422,7 +422,8 @@ class formula(object):
def GetContentMathML(self, asciimath, mathml):
# URL = 'http://192.168.1.2:8080/snuggletex-webapp-1.2.2/ASCIIMathMLUpConversionDemo'
URL = 'http://127.0.0.1:8080/snuggletex-webapp-1.2.2/ASCIIMathMLUpConversionDemo'
# URL = 'http://127.0.0.1:8080/snuggletex-webapp-1.2.2/ASCIIMathMLUpConversionDemo'
URL = 'https://math-xserver.mitx.mit.edu/snuggletex-webapp-1.2.2/ASCIIMathMLUpConversionDemo'
if 1:
payload = {'asciiMathInput': asciimath,
......@@ -430,7 +431,7 @@ class formula(object):
#'asciiMathML':unicode(mathml).encode('utf-8'),
}
headers = {'User-Agent': "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13"}
r = requests.post(URL, data=payload, headers=headers)
r = requests.post(URL, data=payload, headers=headers, verify=False)
r.encoding = 'utf-8'
ret = r.text
#print "encoding: ",r.encoding
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment